UNPKG

2.23 kBPlain TextView Raw
1{"code":"function defineName$__(cls,name){\n\tObject.defineProperty(cls,\"name\",{value:name,configurable:true});\n};\n\n/*body*/\nimport np from 'path';\n\nexport const env = new class Env {\n\t\n\t\n\t// TODO: remove pm2 hack\n\t// when launching pm2 with an ecosystem file,\n\t// process.argv[1] is ProcessContainerFork.js\n\t// the problem with using process.env.pm_exec_path is if the shell is inherited\n\t// from another process that was started with pm2, the pm_exec_path environment variable\n\t// will also be inherited, which may or may not be a completely different path.\n\tget rootDir(){\n\t\t\n\t\treturn process.env.IMBA_OUTDIR || np.dirname(process.env.pm_exec_path || process.argv[1]);\n\t}\n\t\n\tget publicPath(){\n\t\t\n\t\treturn np.resolve(this.rootDir,process.env.IMBA_PUBDIR || globalThis.IMBA_PUBDIR || 'public');\n\t}\n\tstatic {\n\t\tdefineName$__(this,'Env');}\n};\n","map":{"version":3,"file":"env.js","sourceRoot":"","sources":["/Users/abdellah/workspace/scrimba/imba/packages/imba/src/imba/env.imba"],"sourcesContent":["import np from 'path'\n\nexport const env = new class Env\n\n\t# TODO: remove pm2 hack\n\t# when launching pm2 with an ecosystem file,\n\t# process.argv[1] is ProcessContainerFork.js\n\t# the problem with using process.env.pm_exec_path is if the shell is inherited\n\t# from another process that was started with pm2, the pm_exec_path environment variable\n\t# will also be inherited, which may or may not be a completely different path.\n\tget rootDir\n\t\tprocess.env.IMBA_OUTDIR or np.dirname(process.env.pm_exec_path or process.argv[1])\n\n\tget publicPath\n\t\tnp.resolve(rootDir,process.env.IMBA_PUBDIR or global.IMBA_PUBDIR or 'public')\n"],"names":[],"mappings":";;;;;AAAA,MAAM,CAAC,EAAE,MAAM,MAAM;;AAErB,MAAM,OAAO,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,EAAA;;;;;;;;;CAQ/B,GAAG,CAAC,OAAO,EAAA;;EACV,OAAA,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;EAAA;;CAEnF,GAAG,CAAC,UAAU,EAAA;;EACb,OAAA,EAAE,CAAC,OAAO,CAAC,KAAA,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,UAAM,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC;EAAA;;;AAAA,CAAA;AAC/E;"},"dependencies":[],"meta":{"vite":{"lang":"js"}}}
\No newline at end of file