# generator-mnm

> Create node modules writing ES6 today compiled with Babel, tested with ava and linted with standard on top of npm scripts Create node modules with es6, test with tape on top of npm scripts

Latest version **0.6.1** (published 2025-12-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install generator-mnm
pnpm add generator-mnm
yarn add generator-mnm
bun add generator-mnm
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.6.1 |
| Published | 2025-12-26 |
| First published | 2015-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 16 |
| Unpacked size | 30.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Mauricio Poppe |
| Maintainers | maurizzzio, mauriciopoppe |
| Keywords | mnm, yeoman-generator, boilerplate, es6, node, module, starter, yeoman, scaffold, node-module, npm scripts, generator, yo |

## Links

- npm: https://www.npmjs.com/package/generator-mnm
- Repository: https://github.com/mauriciopoppe/generator-mnm
- Homepage: https://github.com/mauriciopoppe/generator-mnm#readme
- Issues: https://github.com/mauriciopoppe/generator-mnm/issues
- npm.io page: https://npm.io/package/generator-mnm

## Dependencies (16)

- [extend](https://npm.io/package/extend.md) ^3.0.0
- [is-url](https://npm.io/package/is-url.md) ^1.2.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [yamljs](https://npm.io/package/yamljs.md) ^0.2.8
- [defined](https://npm.io/package/defined.md) ^1.0.0
- [to-case](https://npm.io/package/to-case.md) ^2.0.0
- [relative](https://npm.io/package/relative.md) ^3.0.2
- [deps-object](https://npm.io/package/deps-object.md) ^2.0.2
- [parse-author](https://npm.io/package/parse-author.md) ^1.0.0
- [normalize-url](https://npm.io/package/normalize-url.md) ^1.5.2
- [sorted-object](https://npm.io/package/sorted-object.md) ^2.0.0
- [generator-babel](https://npm.io/package/generator-babel.md) ^2.0.2
- [github-username](https://npm.io/package/github-username.md) ^2.1.0
- [yeoman-generator](https://npm.io/package/yeoman-generator.md) ^0.22.6
- [generator-license](https://npm.io/package/generator-license.md) ^3.1.1
- [generator-git-init](https://npm.io/package/generator-git-init.md) ^1.0.4

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.6.1 (latest) — 2025-12-26
- 0.6.0 — 2016-09-26
- 0.5.1 — 2016-05-10
- 0.5.0 — 2016-05-09
- 0.4.0 — 2016-05-06
- 0.3.0 — 2015-12-08
- 0.2.3 — 2015-12-06
- 0.2.2 — 2015-12-06
- 0.2.1 — 2015-12-06
- 0.2.0 — 2015-11-27
- 0.1.1 — 2015-11-26

## README

<div align="center">
<img src="https://cloud.githubusercontent.com/assets/1616682/11403449/409e561e-9373-11e5-9aeb-7dbea090a0bd.gif" width="400px" />

<p>
Create node modules writing ES6/ES7 today compiled with Babel, tested with ava, bundled with rollup and linted with standard on top of npm scripts
</p>

<p>
<a href="https://npmjs.org/package/generator-mnm">
  <img src="https://img.shields.io/npm/v/generator-mnm.svg?style=flat">
</a>
<a href="https://travis-ci.org/maurizzzio/generator-mnm">
  <img src="https://img.shields.io/travis/maurizzzio/generator-mnm.svg?style=flat">
</a>
<img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg">
<a href="https://npmjs.org/package/generator-mnm">
  <img src="http://img.shields.io/npm/dm/generator-mnm.svg?style=flat">
</a>
</p>

</div>
    
## Install

```sh
$ npm install -g yo generator-mnm
```

## Usage

```sh
Usage:
  yo mnm:app [options] [<name>]

Options:
  -h,   --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
  -a,   --all           # Ask all questions                          Default: false
  -y,   --yes           # Skip some questions, like $ npm init -y    Default: false

Arguments:
  name  # module name
  If provided the module will be created inside ./<name>/
  otherwise it will be created in the current directory

  Examples:

     $ yo mnm
     $ yo mnm myAwesomeModule

    Type: String  Required: false
```

Example

```sh
$ yo mnm -y
   create package.json
   create README.md
   create .gitignore
   create src/index.js
   create test/index.js
   create .travis.yml
   create .babelrc
   create rollup.config.js
```

## Features

- Made out of many other generators, the main generator only creates a [`package.json` file](https://github.com/maurizzzio/generator-mnm/blob/master/generators/app/index.js#L225-L240) and a [minimal `.gitignore` file](https://github.com/maurizzzio/generator-mnm/blob/master/generators/app/index.js#L246-L248)
- Composable, since the logic to create the README, cli and other files is on their own subgenerator
- [Babel](https://babeljs.io) transpiles the code/tests
- [standard](http://standardjs.com/) to lint the code
- [ava](https://github.com/sindresorhus/ava) for testing
- [yargs](https://github.com/bcoe/yargs) to parse cli arguments (optional)
- [rollup](https://github.com/rollup/rollup) to create a common js compatible bundle
- npm scripts as the build system

## Example

Check [https://github.com/maurizzzio/generator-mnm-example](https://github.com/maurizzzio/generator-mnm-example)

## List of npm scripts included

Common tasks

| task       | description  |
| -----      | ---          |
| `npm test` | `ava` |
| `npm run build` | `rollup --config`| 
| `npm run lint` | `standard` |
| `npm run clean` | Removes all the files inside `dist/`|

Watching files

| task | description |
| --- | --- |
| `npm run test:watch` | Same as `npm test` but with ` --watch` |
| `npm run build:watch` | Same as `npm run build` but with ` --watch` |

Pre/Post hooks

| Task | description |
| --- | --- |
| `npm run prebuild` | Run before `build`, `npm clean -s && npm lint -s` |
| `npm run preversion` | Run before `version`, `npm run build` |

### Useful npm commands that you should know

- `npm version major|minor|patch` bumps the package version
- `npm run` lists all available scripts

## Why?

This project is heavily inspired by [this article by Keith Cirkel][stop-using-grunt-gulp] where he describes that the existing build system tools attempt to solve the problems that exist among them "covering up the inadequacies of the other tools while also surfacing their own".

[James Halliday](https://www.npmjs.com/~substack) who is the creator of many awesome packages like `browserify` and `tape` also wrote an article where he points out that the command `npm run` is "perfectly adequate for everything while maintaining a very tiny configuration footprint."

### Articles to read:

- [Why we should stop using grunt][stop]
- [How to use npm as a build tool][how-to]
- [Task automation with run][task-automation]
- [Choose grunt, gulp or npm][choose]

### Inspiration projects

- https://github.com/yeoman/generator-node
- https://github.com/vinniegarcia/ES6-module-starter
- https://github.com/sindresorhus/generator-nm
- https://github.com/bucaran/generator-rise
- https://github.com/iamstarkov/generator-zen
- https://github.com/keithamus/npm-scripts-example 's awesome `package.json` file

I'd like to thank [iamstarkov](https://github.com/iamstarkov) for his awesome work on generators that are actually composable

## Composability

Just plug in any of the subgenerators or the `app` generator itself on your generator

<div align="center">
<img src="https://camo.githubusercontent.com/f8dc3e07d956f1f8dbdea5f895800fe53772a50d/687474703a2f2f692e696d6775722e636f6d2f326771696966742e6a7067">
</div>

Generators used in this project

- [generator-babel](https://github.com/iamstarkov/generator-babel)
- [generator-git-init](https://github.com/iamstarkov/generator-git-init)
- [generator-license](https://github.com/jozefizso/generator-license)
- [generator-mnm/generators/src](./generators/src)
- [generator-mnm/generators/test](./generators/test)
- [generator-mnm/generators/cli](./generators/cli)
- [generator-mnm/generators/readme](./generators/readme)

## Workflow

```sh
# equivalent to npm init -y
yo mnm -y
# see https://www.npmjs.com/package/ghrepo
ghrepo -m "initial commit"
# see https://www.npmjs.com/package/travisjs
travisjs hook # or travis enable with the travis gem

# if a cli is needed
yo mnm:cli
```

## Development

- `npm test`
- `npm test:ci` run the tests (open `./test/ci/.tmp` to see a generated)

## License

2015-2016 MIT © [Mauricio Poppe](http://maurizzzio.com)

[stop-using-grunt-gulp]: http://blog.keithcirkel.co.uk/why-we-should-stop-using-grunt/
[stop]: http://blog.keithcirkel.co.uk/why-we-should-stop-using-grunt/
[how-to]: http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/
[task-automation]: http://substack.net/task_automation_with_npm_run
[choose]: http://ponyfoo.com/articles/choose-grunt-gulp-or-npm

---
_Source: https://npm.io/package/generator-mnm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
