From f3d2e43787b08fe245c09413ad6329dad64bf4d9 Mon Sep 17 00:00:00 2001 From: baozhoutao Date: Thu, 9 Dec 2021 20:01:09 +0800 Subject: [PATCH] =?UTF-8?q?.npmrc=20.yarnrc=20=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 ++- .scripts/copy_template.js | 32 ++++++++++--------- .../templates/default/gitignore | 5 ++- steedos-projects/project-template/.gitignore | 5 ++- 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index a70316a750..44afdff6a3 100644 --- a/.gitignore +++ b/.gitignore @@ -63,4 +63,7 @@ packages/cli/dist/** docker-volumes packages/node-red-app-template/yarn.lock -steedos-projects/project-dev/** \ No newline at end of file +steedos-projects/project-dev/** + +.npmrc +.yarnrc \ No newline at end of file diff --git a/.scripts/copy_template.js b/.scripts/copy_template.js index 6bb9d29377..6b202b7099 100644 --- a/.scripts/copy_template.js +++ b/.scripts/copy_template.js @@ -5,6 +5,8 @@ cpy([ '**', '.steedos/**', '!.steedos/node_modules/**', + '!.steedos/.npmrc', + '!.steedos/.yarnrc', '.vscode/**', '!**/node_modules/**', '!logs/**', @@ -15,26 +17,26 @@ cpy([ '!init_home.sh', '.env', ], '../../packages/create-steedos-app/templates/default', { - parents: true, + parents: true, flat: false, cwd: path.join(process.cwd(), 'steedos-projects', 'project-template'), rename: (name) => { switch (name) { - case '.env': - return 'env' - case '.gitignore': { - return 'gitignore' - } - case 'package.json': { - return '_package.json' - } - default: { - return name - } + case '.env': + return 'env' + case '.gitignore': { + return 'gitignore' + } + case 'package.json': { + return '_package.json' + } + default: { + return name + } } - } -}).then(()=>{ + } +}).then(() => { console.log(`copy default template end: packages/create-steedos-app/templates/default`); -}).catch((result)=>{ +}).catch((result) => { console.log(`error`, result); }) \ No newline at end of file diff --git a/packages/create-steedos-app/templates/default/gitignore b/packages/create-steedos-app/templates/default/gitignore index fc44ab529d..ca969f948b 100644 --- a/packages/create-steedos-app/templates/default/gitignore +++ b/packages/create-steedos-app/templates/default/gitignore @@ -25,4 +25,7 @@ docker-volumes # steedos-packages/**/** !/steedos-packages/*.package server.log -logs \ No newline at end of file +logs + +.npmrc +.yarnrc \ No newline at end of file diff --git a/steedos-projects/project-template/.gitignore b/steedos-projects/project-template/.gitignore index fc44ab529d..ca969f948b 100644 --- a/steedos-projects/project-template/.gitignore +++ b/steedos-projects/project-template/.gitignore @@ -25,4 +25,7 @@ docker-volumes # steedos-packages/**/** !/steedos-packages/*.package server.log -logs \ No newline at end of file +logs + +.npmrc +.yarnrc \ No newline at end of file