An easily composable Yeoman generator for quickly generating a license, README, and package.json that suits your needs
npm install -g yonpm install -g generator-init-enhanced
Then generate your new project:
Usage in Your Own Project
Simply answer all of the prompts after typing in the command above, and you're good to go! generator-init-enhanced will even remember what you answered last time! If you'd like to stick to the defaults and skip all prompts, simply generate with the --yes or --y flag:
yo init-enhanced --y
Note: I'd recommend not using the --yes/--y flag the first time you generate, so that you can enter all of your personal information once and have it filled out automatically for you in the future
Usage in Your Generator
There are two ways you can use this generator within yours. You can supply your own information, or you can allow it to do the work for you. Here's an example of supplying your own information:
Note: generator-init-enhanced will remember users' past preferences and change defaults accordingly for fields like author and email that will likely remain the same across projects; consequently, even though it says above that there's no default for the author field, there will be a default if the user has used this generator before
Note: All fields are optional, yet recommended
You can also just let generator-init-enhanced do the work and prompt for you! It will remember user preferences. Here's an example:
There's also an easy way to imitate npm/yarn init --y/yes, in which all defaults are used and prompting is skipped. Here's an example:
Licenses you can choose:
- Apache 2.0
- BSD 2-Clause (FreeBSD) License
- BSD 3-Clause (NewBSD) License
- GNU AGPL 3.0
- GNU GPL 3.0
- GNU LGPL 3.0
- Internet Systems Consortium (ISC) License
- Mozilla Public License 2.0
- No License (Copyrighted)
Getting To Know Yeoman
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.
© Brandon Suen