Create a Node.js module with ease
See node-mdl-starter, it is an example of what you get using this generator and it is automatically generated with every new release of this generator.
npm install --global yo generator-node-mdl
yo node-mdl
# answer questions
With the most basic options, youʼll get a project structured like this:
$ tree
.
├── .github
│ ├── issue_template.md
│ └── pull_request_template.md
├── other
│ ├── code_of_conduct.md
│ ├── examples.md
│ └── roadmap.md
├── src
│ ├── index.js
│ └── index.test.js
├── .babelrc
├── .editorconfig
├── .esdoc.json
├── .eslintignore
├── .eslintrc
├── .gitattributes
├── .gitignore
├── .npmignore
├── .travis.yml
├── contributing.md
├── license
├── package.json
├── readme.md
└── yarn.lock
Less boilerplate 🎉
There are 2 ways to supply your data to this generator.
The obvious way is runnin yo node-mdl
and answer all questions. You can bypass questions by passing options as arguments.
Run yo node-mdl --help
to see the different options.
This project contain some features that will make your life easier when setting up a new open-source project. Based on your choices, you may be asked to supply some of your accounts usernames and passwords (github, npm, etc...) so this project will automatically produce tokens for those accounts and save them to your TravisCI as secured enviorment variables if needed. You can bypass those questions by manually creating tokens and supply them using options as arguments.
--npmToken my-token
is needed when using with --npmDeploy
.
Your token will end up in TravisCI
as a secured enviorment variables called NPM_TOKEN
.
--githubToken my-token
is needed when using with --createGithubRepository
or with --travisCI
.
creating and viewing github authentication tokens
When using with --createGithubRepository
your token doesn't need to contain any scope.
When using with --travisCI
but without --semanticRelease
your token doesn't need to contain any scope.
When using with --travisCI
and with --semanticRelease
your token need to contain the following scopes:
repo
read:org
user:email
repo_deployment
repo:status
write:repo_hook
Read how to do it here.
generator-oss - Supports ES2015+ and XO by default
MIT © Avi Sharvit