Skip to content

Commit 8660cca

Browse files
committed
Rename files so it will not be ignored by npm
1 parent 8947165 commit 8660cca

13 files changed

Lines changed: 22 additions & 19 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kdcsoftware/create-nodejs",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"description": "NodeJs boilerplate",
55
"main": "lib/index.js",
66
"bin": "./cli.js",

src/configs.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
const CONFIG_FILES = [
2-
'.babelrc',
3-
'.editorconfig',
4-
'.eslintrc',
5-
'.gitignore',
6-
'.prettierrc',
7-
'.vscode/launch.json',
8-
'codecov.yml',
9-
'jest.config.js',
10-
'.github/workflows/push.yml',
11-
'.github/workflows/publish.yml',
12-
'LICENSE',
13-
];
1+
const CONFIG_FILES = {
2+
babelrc: '.babelrc',
3+
editorconfig: '.editorconfig',
4+
eslintrc: '.eslintrc',
5+
gitignore: '.gitignore',
6+
prettierrc: '.prettierrc',
7+
'vscode/launch.json': '.vscode/launch.json',
8+
'codecov.yml': 'codecov.yml',
9+
'jest.config.js': 'jest.config.js',
10+
'github/workflows/push.yml': '.github/workflows/push.yml',
11+
'github/workflows/publish.yml': '.github/workflows/publish.yml',
12+
LICENSE: 'LICENSE',
13+
};
1414

1515
export default CONFIG_FILES;

src/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ const run = async ({ packageName }) => {
3131
await npmProcProd;
3232

3333
// copy config
34-
CONFIG_FILES.forEach((c) => {
34+
Object.keys(CONFIG_FILES).forEach((k) => {
35+
const c = CONFIG_FILES[k];
3536
fse.copySync(
36-
resolve(`${PKG_DIR}/..`, `templates/${c}`),
37+
resolve(`${PKG_DIR}/..`, `templates/${k}`),
3738
`${CUR_DIR}/${c}`
3839
);
3940
});
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)