4.0.1 • Published 5 years ago
generator-oniyi v4.0.1
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>fromnameor resolved fromauthorEmail) - The name of the account on Github that hosts your repository - repository-name; (default:
nameof the module;repositoryfrompackage.jsonor fromgit remote origin) - The name of your repository on Github
boilerplate generator
- copies
devDependenciesandscriptsfrom the generator'spackage.jsoninto your project'spackage.json - creates
.npmrcand.npmignorefiles - creates
lib/index.jsandlib/__tests__/<module-name>.test.js - creates
eslintconfig files (combines rules fromairbnb-baseandprettier) - creates
jest.config.js - creates
prettier.config.js - creates config files for git hook tooling
huskyrc.jsandlint-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
gitoption is set to false,coverallsandtravisare false / disabled automatically - add
.gitignoreand.gitattributesfiles - prompts for github account (see option
github-account) - prompts repository name (see option
repository-name) - adds
repositoryinformation 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
travisoption istrue. Whencoverallsoption is alsotrue, will addafter_scriptin travis config to publish coverage report data to coveralls. - invokes generator-license and default to
Apache-2.0license.
License
Apache-2.0 © Benjamin Kroeger