Skip to content

Commit f45cf8e

Browse files
committed
Merge branch 'dev'
2 parents 577bb48 + 1372039 commit f45cf8e

File tree

4 files changed

+26
-36
lines changed

4 files changed

+26
-36
lines changed

README.md

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,57 +10,45 @@ An [npm initializer][npm/init] to scaffold a node project and include basic tool
1010
1111
## Requirements
1212

13-
- `npm >= x.x`
14-
- `node >= x.x`
13+
- `npm >= 6.5`
14+
- `node >= 10.9`
1515

1616
## Usage
1717

18-
`npm init node-project path/to/project [params]`
18+
`npm init node-project path/to/project`
1919

20-
## Params
20+
## What it does
2121

22-
### Project path
23-
24-
`npm init node-project path/to/project [params]`
25-
26-
Will create a new folder for the project in the specified path.
22+
1. Create the folder for the new project
23+
1. Guide you through a questionnarie to setup the project
24+
2. Initialize a git repo
25+
3. Copy the template files (src, eslintrc, gitignore, readme, etc)
26+
4. Can create a Github repository
27+
5. Install eslint
28+
5. Install the selected testing dependencies
29+
6. Generate package.json with all the project details
30+
7. Commit and push the initial commit
2731

2832
## About this package
2933

3034
So, this started as a dry thing.
31-
I'm not super 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.
35+
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.
3236
So, the idea is to have a create package to use it in the form of:
33-
`npm init node-project a-demo-project`
37+
`npm init node-project path/to/project`
3438
and with this have a new folder my-new-project with everything ready to work.
3539

3640
I know there are a lot of similar packages out there, but the idea is to learn more about nodejs api, handling files, packages, etc.
3741

38-
So far, what this package will do (already does) is:
39-
1. Create the folder for the new project
40-
2. Create a git repo
41-
3. Copy the structure for files (src, and root files like eslintrc, gitignore, readme, etc)
42-
4. Create a github repository
43-
5. Install eslint and jest dependencies
44-
6. Update package.json
45-
7. Commit and push the initial commit
42+
## Future features
4643

47-
What I have in my TODO list:
4844
1. Fix the structure of modules, classes and etc
49-
2. ~~Avoid as much dependencies as possible~~
50-
3. ~~Understand about the difference for eslint airbnb and eslint plugin node~~
5145
4. Add unit testing
52-
5. ~~Improve the calls for shell (right now is with exec, but I need to use spawn in order to have the stdout inherit, but that mess with the sync method and the responses)~~
53-
6. ~~Add documentation for classes, modules and methods~~
5446
7. Add options to create the project with params instead of questionnaire
55-
8. ~~Add questionnaire for the creation~~
56-
9. Publish the npm package
5747
10. Add a good error handler
5848
11. Color for the console messages
5949
12. Modify template structure (the one that is generated in the new project) to include unit test
6050
13. Include license files to the template copy/update process
6151
14. A logger ? (just for learning)
62-
15. ~~CWD for git commands~~
63-
16. Best place for the auth.json
6452
17. Ability to handle auth for different github accounts
6553
18. Option to questionnaire with all the default values
6654

@@ -99,7 +87,7 @@ If you are planning to allow this script to create your github repositories, is
9987
[license-url]: LICENSE
10088
[license-image]: https://img.shields.io/github/license/ahmadnassri/node-create.svg?style=for-the-badge&logo=circleci
10189

102-
[npm-url]: https://www.npmjs.com/package/@nmicht/create
90+
[npm-url]: https://www.npmjs.com/package/create-nodejs-project
10391
[npm-image]: https://img.shields.io/npm/v/@nmicht/create.svg?style=for-the-badge&logo=npm
10492

10593
[npm/init]: https://docs.npmjs.com/cli/init#description

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "create-node-project",
3-
"version": "0.1.0",
2+
"name": "create-nodejs-project",
3+
"version": "0.1.2",
44
"description": "An npm initializer to scaffold a node project and include basic tools like lint, testing, etc.",
55
"main": "src/index.js",
66
"bin": "src/index.js",
@@ -39,10 +39,10 @@
3939
},
4040
"repository": {
4141
"type": "git",
42-
"url": "git+https://github.com/nmicht/create-node-project.git"
42+
"url": "git+https://github.com/nmicht/create-nodejs-project.git"
4343
},
4444
"bugs": {
45-
"url": "https://github.com/nmicht/create-node-project/issues"
45+
"url": "https://github.com/nmicht/create-nodejs-project/issues"
4646
},
47-
"homepage": "https://github.com/nmicht/create-node-project#readme"
47+
"homepage": "https://github.com/nmicht/create-nodejs-project#readme"
4848
}

src/index.js

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env node
2+
13
const path = require('path');
24
const fs = require('fs');
35

0 commit comments

Comments
 (0)