Skip to content

Commit 221238e

Browse files
authored
Merge pull request #23 from nmicht/develop
v1.0.0
2 parents a290cab + 23eb505 commit 221238e

Some content is hidden

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

47 files changed

+1034
-428
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

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
language: node_js
2+
node_js:
3+
- "10"

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.0.0
4+
* Settings is a global object handle from an accessible json file.
5+
* Includes some unit tests
6+
* Added CI with travis
7+
38
## 0.2.0
49
* Generate license file
510

README.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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

5-
[![License][license-image]][license-url] [![version][npm-image]][npm-url]
5+
[![License][license-image]][license-url] [![version][npm-image]][npm-url] [![coverage][coverage-image]][coverage-url] [![downloads][downloads-image]][downloads-url]
66

77
An [npm initializer][npm/init] to scaffold a node project and include basic tools like lint, testing, etc.
88

@@ -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

@@ -22,7 +22,11 @@ An [npm initializer][npm/init] to scaffold a node project and include basic tool
2222
npm install -g create-nodejs-project
2323
```
2424

25-
2. You will be prompted for your Github information
25+
2. Run the setup configuration
26+
```
27+
npm setup
28+
```
29+
You will be prompted for your Github information
2630
If you do not have the information at the moment, you can keep it empty.
2731
In order to create projects with Github integration, you will need to add the authentication information later. See [Github Auth](#configure-Github-authentication)
2832

@@ -34,11 +38,10 @@ npm init nodejs-project path/to/new/project
3438
## What it does
3539

3640
1. Create the folder for the new project
37-
1. Guide you through a questionnarie to setup the project
41+
1. Guide you through a questionnaire to setup the project
3842
2. Initialize a git repository
3943
3. Copy the template files (src, eslintrc, gitignore, readme, etc)
40-
4. Can create a Github repository
41-
5. Handle the Github tokens for multiple accounts/users
44+
4. Create a Github repository
4245
5. Install eslint dependencies
4346
5. Install the selected testing dependencies
4447
6. Generate package.json with all the project details
@@ -47,22 +50,22 @@ npm init nodejs-project path/to/new/project
4750

4851
## About this package
4952

50-
The motivation started as a **DRY** thing.
53+
Every time that I start a new project in Node.js, I hate to go to other project folder, copy files like eslintrc, editorconfig; install the same dependencies, create folder structure, etc.
5154

52-
I'm not expert with NodeJS, but every time that I start a new project, I hate to go to other project, copy files like eslintrc, editorconfig, install the same dependencies, create folder structure, etc.
55+
With this in mind, the motivation to build this package started as a **DRY** (Do not repeat yourself) thing.
5356

54-
So, the idea is to have an automated way to initialize new NodeJS projects and with this have a new folder with everything ready to work in what really matters.
57+
This package is intended to automated the initialization of new Node.js projects and with this have a new folder with everything ready to work, basically an scaffolding tool.
5558

5659

5760
## Future features
5861

5962
1. Unit testing
60-
7. Options to create the project with params instead of questionnaire
63+
7. Options to create the project with parameters instead of questionnaire
6164
10. A good error handler
6265
11. Color for the console messages
6366
12. Improve the template structure (the one that is generated in the new project) to include unit test
6467
18. Option to questionnaire with all the default values
65-
2. Logic to handle multiple auth files and multiple github accounts
68+
2. Logic to handle multiple authentication files and multiple Github accounts
6669

6770
## Configure Github Authentication
6871

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

8689
```
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-
}
90+
# nano /YOUR-NODE_MODULES-PATH/create-nodejs-project/create-nodejs-settings.json
91+
92+
...
93+
...
94+
"githubAuth": {
95+
"user": "YOUR_USER",
96+
"token": "YOUR_TOKEN"
97+
}
98+
...
99+
...
101100
```
102101

103102

@@ -109,3 +108,9 @@ If you are planning to allow this script to create your Github repositories, is
109108
[npm-image]: https://img.shields.io/npm/v/create-nodejs-project.svg?style=for-the-badge&logo=npm
110109

111110
[npm/init]: https://docs.npmjs.com/cli/init#description
111+
112+
[downloads-url]: https://www.npmjs.com/package/create-nodejs-project
113+
[downloads-image]: https://img.shields.io/npm/dt/create-nodejs-project.svg?style=for-the-badge
114+
115+
[coverage-url]: https://coveralls.io/github/nmicht/create-nodejs-project?branch=master
116+
[coverage-image]: https://img.shields.io/coveralls/github/nmicht/create-nodejs-project.svg?style=for-the-badge

create-nodejs-project-example.json

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
"templates": [
35+
"nodejs-project",
36+
],
37+
"settingsPath": "/YOUR_PATH/create-nodejs-project/create-nodejs-settings.json",
38+
"templatesPath": "/YOUR_PATH/create-nodejs-project/templates",
39+
"licensesPath": "/YOUR_PATH/create-nodejs-project/templates/licenses"
40+
}

install/index.js

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

0 commit comments

Comments
 (0)