From 2d348483a3b659d03c07ffea1422b990445883ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Jaro=C5=A1?= Date: Sat, 9 Sep 2023 20:43:02 +0200 Subject: [PATCH] Remove initial .npmrc Change-Id: I1bd5bb871ff8898d9fd8405c21315912dc6b5cb2 --- create.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/create.js b/create.js index b8b6b03..b126be4 100644 --- a/create.js +++ b/create.js @@ -27,11 +27,6 @@ if (!fs.existsSync(appDir)) { fs.mkdirSync(`${appDir}/src`); } -// rename internal files -fs.renameSync(`${rootDir}/source/shared/npmrc`, `${rootDir}/source/shared/.npmrc`); -fs.renameSync(`${rootDir}/source/shared/gitignore`, `${rootDir}/source/shared/.gitignore`); -fs.renameSync(`${rootDir}/source/shared/prettierrc`, `${rootDir}/source/shared/.prettierrc`); - // copy folder content try { fs.cpSync(`${rootDir}/source/shared/`, contextDir, { @@ -46,6 +41,12 @@ try { console.error(err); } +// rename internal files +fs.unlinkSync('.npmrc'); +fs.renameSync(`${contextDir}/npmrc`, `${contextDir}/.npmrc`); +fs.renameSync(`${contextDir}/gitignore`, `${contextDir}/.gitignore`); +fs.renameSync(`${contextDir}/prettierrc`, `${contextDir}/.prettierrc`); + // replace in files replaceInFiles.sync({ files: `./${contextDir}/**/*.{ts,tsx}`,