Update .npmrc

Change-Id: I3ffc186339c2124d39e88ee681448122f4bd9a6e
This commit is contained in:
Roman Jaroš 2023-09-09 20:58:05 +02:00
parent 2d348483a3
commit 0d4e6f21c6
3 changed files with 7 additions and 4 deletions

View file

@ -8,8 +8,9 @@ const appName = argv.name ?? 'app';
const appPort = argv.port ?? '0';
const isMonorepo = argv.monorepo === 'T';
const defaultContextDir = './';
const rootDir = __dirname;
const contextDir = `${argv._[0]}/` ?? './';
const contextDir = `${argv._[0]}/` ?? defaultContextDir;
// create app folder
const appsDir = `${contextDir}/apps`;
@ -42,7 +43,9 @@ try {
}
// rename internal files
fs.unlinkSync('.npmrc');
if (contextDir === defaultContextDir) {
fs.unlinkSync(`${contextDir}/.npmrc`);
}
fs.renameSync(`${contextDir}/npmrc`, `${contextDir}/.npmrc`);
fs.renameSync(`${contextDir}/gitignore`, `${contextDir}/.gitignore`);
fs.renameSync(`${contextDir}/prettierrc`, `${contextDir}/.prettierrc`);