Scaffold out a node module
Generate files with sane defaults to reduce boilerplate
$ yarn global add yo generator-gemod
With yo:
$ yo gemod
There are multiple command-line options available:
$ yo gemod --help
Usage:
yo gemod [options]
Options:
--help # Print the generator's options and usage
--org # Publish to a GitHub organization account
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--coverage # Add jest's code coverage (uploads to codecov.io) Default: false
--deploy # Adds a step to travis to deploy the module to npm Default: false
# (needs `$NPM_TOKEN` env variable on travis-ci)
- Test things with jest
- Lint code with xo and prettier
- Run linting before a git commit
- Run tests before a git push
The generated files will look like this:
βββ .git
βββ .gitignore
βββ .npmrc
βββ .prettierrc
βββ .travis.yml
βββ .travis.yml
βββ .yo-rc.json
βββ node_modules
βββ index.js
βββ index.test.js
βββ license
βββ package.json
βββ readme.md
βββ yarn.lock
- Fork it (https://github.com/George-Aidonidis/generator-gemod/fork)
- Create your feature branch (git checkout -b feature/fooBar)
- Commit your changes (git commit -am 'Add some fooBar')
- Push to the branch (git push origin feature/fooBar)
- Create a new Pull Request
MIT Β©