Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
serverURL: 'http://localhost:3000',
clientURL: 'http://localhost:3001',
prototypeURL: 'http://localhost:3002',
hasServer: true,
debug: false,
reactHotLoader: false,
};
const kytConfigPath = optionalConfig
? path.join(userRootPath, optionalConfig)
: userKytConfigPath;
// Find user config
if (shell.test('-f', kytConfigPath)) {
try {
logger.log('');
logger.info(`Using kyt config at ${kytConfigPath}`);
// eslint-disable-next-line global-require,import/no-dynamic-require
config = require(kytConfigPath);
} catch (error) {
logger.error('Error loading your kyt.config.js:', error);
process.exit();
}
}
config = merge({}, baseConfig, config);
if (typeof config.modifyWebpackConfig === 'function') {
logger.info('What are you doing in your modifyWebpackConfig?');
logger.info('Let us know: https://github.com/NYTimes/kyt/issues/432');
}
module.exports = (flags, args) => {
logger.start("Let's set up your new kyt project...");
logger.log('āØ Answer a few questions to get started āØ \n');
// Selects package manager to use
let ypm;
// Comment the following to see verbose shell ouput.
shell.config.silent = true;
let paths = {};
const date = Date.now();
let tmpStarter;
// For passed starter-kyts the root of the starter-kyt is the root of the repo
let tmpDir;
let repoURL = 'https://github.com/NYTimes/kyt.git';
let { localPath } = args;
let tempPackageJSON;
let oldPackageJSON;
const fakePackageJson = {
name: '',
version: '1.0.0',
const bailProcess = error => {
logger.error(`Failed to setup: ${repoURL}`);
if (error) logger.log(error);
removeTmpStarter();
process.exit();
};