Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/generator-nm
Scaffold out a node module
https://github.com/sindresorhus/generator-nm
Last synced: 27 days ago
JSON representation
Scaffold out a node module
- Host: GitHub
- URL: https://github.com/sindresorhus/generator-nm
- Owner: sindresorhus
- License: mit
- Created: 2015-03-14T05:58:33.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2023-06-09T11:13:26.000Z (over 1 year ago)
- Last Synced: 2024-04-14T11:09:11.921Z (7 months ago)
- Language: JavaScript
- Size: 279 KB
- Stars: 741
- Watchers: 14
- Forks: 90
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome - sindresorhus/generator-nm - Scaffold out a node module (JavaScript)
- awesome-npm - generator-nm - Scaffold out an npm package. (Packages / Other)
- awesome-nodejs-cn - generator-nm - **star:741** 构建一个节点模块 ![项目已归档][Archived] (资源 / 杂项)
- awesome-npm - generator-nm - Scaffold out an npm package. (Packages / Other)
- awesome-nodejs - generator-nm - Scaffold out a node module. (Resources / Miscellaneous)
- awesome-nodejs - generator-nm - Scaffold out a node module - ★ 570 (Miscellaneous)
README
> [!IMPORTANT]
> Deprecated. Just use [this boilerplate](https://github.com/sindresorhus/node-module-boilerplate) instead.# generator-nm
> Scaffold out a [node module](https://github.com/sindresorhus/node-module-boilerplate)
Optionally with a [CLI](http://en.wikipedia.org/wiki/Command-line_interface).
This is what I use for [my own modules](https://www.npmjs.com/~sindresorhus).
![](screenshot.png)
## Install
```sh
npm install --global yo generator-nm
```## Usage
With [yo](https://github.com/yeoman/yo):
```sh
yo nm
```There are multiple command-line options available:
```
$ yo nm --helpUsage:
yo nm [options]Options:
--help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--skip-install # Do not automatically install dependencies Default: false
--org # Publish to a GitHub organization account
--cli # Add a CLI
--coverage # Add code coverage with nyc
--codecov # Upload coverage to codecov.io (implies --coverage)
```The `--org` option takes a string value (i.e. `--org=avajs`). All others are boolean flags and can be negated with the `no` prefix (i.e. `--no-codecov`). You will be prompted for any options not passed on the command-line.
## Tip
Use [chalk](https://github.com/sindresorhus/chalk) if you want colors in your CLI.