README
generator-oniyi
An opinionated generator for node.js projects.
Mostly based on generator-node, so thanks to the team over there.
It creates a boilerplate project setup composed from multiple sub-generators and finally installs dependencies via npm
.
options
All boolean
options can be set to false with --no-<option>
(e.g. --no-git
)
- git; (default:
true
) - Execute git sub-generator - boilerplate; (default:
true
) - Execute boilerplate sub-generator - license; (default:
true
) - Execute license sub-generator - readme; (default:
true
) - Execute readme sub-generator - travis; (default:
true
) - Execute travis sub-generator - coveralls; (default:
true
) - Include coveralls configuration - project-root; (default:
'lib'
) - Relative path to the project code root (folder in repo where code resides) - [name]: (default:
dirname
) - The name for this module - [github-account]; (default:
@<scope>
fromname
or resolved fromauthorEmail
) - The name of the account on Github that hosts your repository - [repository-name]; (default:
name
of the module;repository
frompackage.json
or fromgit remote origin
) - The name of your repository on Github
boilerplate generator
- copies
devDependencies
andscripts
from the generator'spackage.json
into your project'spackage.json
- creates
.npmrc
and.npmignore
files - creates
lib/index.js
andlib/__tests__/<module-name>.test.js
- creates
eslint
config files (combines rules fromairbnb-base
andprettier
) - creates
jest.config.js
- creates
prettier.config.js
- creates config files for git hook tooling
huskyrc.js
andlint-staged.config.js
git generator
This sub-generator will not overwrite any existing repository
data in package.json
.
It will however attempt to register a ssh url version of package.json#repository[.url]
as git remote origin
if no origin
exists yet.
- when
git
option is set to false,coveralls
andtravis
are false / disabled automatically - add
.gitignore
and.gitattributes
files - prompts for github account (see option
github-account
) - prompts repository name (see option
repository-name
) - adds
repository
information topackage.json
- adds git remote origin if none exists
readme generator
- generates boilerplate readme if none exists alreads
- composes readme info from propmts collected upfront (user, lincese, badges)
external sub-generators
- invokes generator-travis when
travis
option istrue
. Whencoveralls
option is alsotrue
, will addafter_script
in travis config to publish coverage report data to coveralls. - invokes generator-license and default to
Apache-2.0
license.
License
Apache-2.0 © Benjamin Kroeger