Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// kill(3) Ctrl-\
process.once('SIGQUIT', () => onSignal('SIGQUIT'));
// kill(15) default
process.once('SIGTERM', () => onSignal('SIGTERM'));
function onSignal() {
if (closed) return;
closed = true;
process.exit(0);
}
process.env.NODE_ENV = 'development';
const args = yParser(process.argv.slice(2));
const Service = require('umi-build-dev/lib/Service').default;
new Service(buildDevOpts(args)).run('dev', args);
'--help': 'help',
};
spinner.succeed();
switch (script) {
case 'build':
case 'dev':
case 'test':
case 'inspect':
// eslint-disable-next-line import/no-dynamic-require
require(`./scripts/${script}`);
break;
default: {
const Service = require('umi-build-dev/lib/Service').default;
new Service(buildDevOpts(args)).run(aliasMap[script] || script, args);
break;
}
}
'-h': 'help',
'--help': 'help',
};
switch (script) {
case 'build':
case 'dev':
case 'test':
case 'inspect':
case 'ui':
// eslint-disable-next-line import/no-dynamic-require
require(`./scripts/${script}`);
break;
default: {
const Service = require('umi-build-dev/lib/Service').default;
new Service(buildDevOpts(args)).run(aliasMap[script] || script, args);
break;
}
}
import yParser from 'yargs-parser';
import buildDevOpts from '../buildDevOpts';
process.env.NODE_ENV = 'production';
process.env.UMI_UI = 'none';
const args = yParser(process.argv.slice(2));
const Service = require('umi-build-dev/lib/Service').default;
new Service(buildDevOpts(args)).run('build', args);