Skip to content

Commit 574c4ae

Browse files
authored
Merge pull request #17 from nmicht/feature/config-settings
Unit testing and refactor to use settings as a dependency injection
2 parents 244dad4 + c2b3c72 commit 574c4ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+948
-413
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/*
22
.env
33
.idea
4+
create-nodejs-settings.json

README.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<img width="75px" height="75px" align="right" alt="Create NodeJS Project Logo" src="https://raw.githubusercontent.com/nmicht/create-nodejs-project/master/assets/create-nodejs-project.png" title="Create NodeJS Project"/>
22

3-
# Node Project Initializer
3+
# Node.js Project Initializer
44

55
[![License][license-image]][license-url] [![version][npm-image]][npm-url]
66

@@ -13,7 +13,7 @@ An [npm initializer][npm/init] to scaffold a node project and include basic tool
1313
## Requirements
1414

1515
- `npm >= 6.5`
16-
- `node >= 10.1.0`
16+
- `node >= 10.12.0`
1717

1818
## Usage
1919

@@ -84,20 +84,16 @@ If you are planning to allow this script to create your Github repositories, is
8484
5. Open Terminal and add the Github token.
8585

8686
```
87-
# nano ~/create-nodejs-project.json
88-
89-
{
90-
"github": [
91-
{
92-
"user": "YOUR_USER",
93-
"token": "YOUR_TOKEN"
94-
},
95-
{
96-
"user": "OTHER_USER",
97-
"token": "OTHER_TOKEN"
98-
}
99-
]
100-
}
87+
# nano /YOUR-NODE_MODULES-PATH/create-nodejs-project/create-nodejs-settings.json
88+
89+
...
90+
...
91+
"githubAuth": {
92+
"user": "YOUR_USER",
93+
"token": "YOUR_TOKEN"
94+
}
95+
...
96+
...
10197
```
10298

10399

create-nodejs-project-example.json

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"licenses": [
3+
"GNU AGPLv3",
4+
"GNU GPLv3",
5+
"GNU LGPLv3",
6+
"Mozilla Public License 2.0",
7+
"Apache License 2.0",
8+
"MIT License",
9+
"ISC License"
10+
],
11+
"githubAuth": {
12+
"user": "YOUR_USER",
13+
"token": "YOUR_TOKEN"
14+
},
15+
"lintPkgs": [
16+
"eslint",
17+
"eslint-plugin-node",
18+
"eslint-config-airbnb",
19+
"eslint-plugin-import",
20+
"eslint-plugin-jsx-a11y",
21+
"eslint-plugin-react"
22+
],
23+
"testingPkgs": [
24+
"jest",
25+
"mocha",
26+
"chai",
27+
"sinon",
28+
"nock"
29+
],
30+
"defaults": {
31+
"license": "GNU GPLv3",
32+
"version": "0.1.0"
33+
},
34+
"settingsPath": "/YOUR_PATH/create-nodejs-project/create-nodejs-settings.json",
35+
"templatesPath": "/YOUR_PATH/create-nodejs-project/templates",
36+
"nodejsTemplatePath": "/YOUR_PATH/create-nodejs-project/templates/nodejs-project",
37+
"licensesPath": "/YOUR_PATH/create-nodejs-project/templates/licenses"
38+
}

install/index.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)