|
|
|
|
5
|
const argv = process.argv.slice(2);
|
5
|
const argv = process.argv.slice(2);
|
6
|
const json = await readFile(new URL('./package.json', import.meta.url), { encoding: 'utf8' });
|
6
|
const json = await readFile(new URL('./package.json', import.meta.url), { encoding: 'utf8' });
|
7
|
const pack = JSON.parse(json);
|
7
|
const pack = JSON.parse(json);
|
8
|
-const production = (pack.version.indexOf('-dev') < 0);
|
|
|
|
|
8
|
+const production = !pack.version.endsWith('-dev');
|
9
|
const minify = (argv.indexOf('--minify') >= 0);
|
9
|
const minify = (argv.indexOf('--minify') >= 0);
|
10
|
const serve = (argv.indexOf('--serve') >= 0);
|
10
|
const serve = (argv.indexOf('--serve') >= 0);
|
11
|
|
11
|
|