Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
// Remove some files that aren't relevant for an individual project within a monorepo
fse.removeSync(path.join(packagePath, '.gitignore'));
fse.removeSync(path.join(packagePath, '.gitattributes'));
fse.removeSync(path.join(packagePath, '.vscode'));
rushAddPackage(name, rootPath);
logger.info('Running rush update');
rushUpdate(rootPath);
logger.info('All Set!');
const readmeFile = path.join(packagePath, 'README.md');
if (fse.existsSync(readmeFile)) {
logger.info('\n' + prettyPrintMarkdown(fse.readFileSync(readmeFile).toString()));
}
}
};
}
You can build your project in production mode with these commands:
cd ${paths.projectPath}
${pkg.getYarn() ? 'yarn' : 'npm run'} build
${existsSync(path.join(paths.projectPath, 'plopfile.js')) &&
`
This repository contains code generators that can be triggered by:
cd ${paths.projectPath}
${pkg.getYarn() ? 'yarn' : 'npm run'} gen
`}`;
logger.info(prettyPrintMarkdown(nextStepsMd));
}
if (pkgJson && pkgJson.devDependencies && pkgJson.just && pkgJson.just.stack) {
delete pkgJson.devDependencies[pkgJson.just.stack];
}
fse.writeFileSync(path.join(packagePath, 'package.json'), JSON.stringify(pkgJson, null, 2));
rushAddPackage(name, rootPath);
logger.info('Running rush update');
rushUpdate(rootPath);
logger.info('All Set!');
const readmeFile = path.join(packagePath, 'README.md');
if (fse.existsSync(readmeFile)) {
logger.info('\n' + prettyPrintMarkdown(fse.readFileSync(readmeFile).toString()));
}
}
};
}