
Security News
Federal Government Rescinds Software Supply Chain Mandates, Makes SBOMs Optional
The U.S. government is rolling back software supply chain mandates, shifting from mandatory SBOMs and attestations to a risk-based approach.
generate-node
Advanced tools
Generate a node.js project, with everything you need to begin writing code and easily publish the project to npm.
Generate a node.js project, with everything you need to begin writing code and easily publish the project to npm.
Install globally with npm
$ npm install -g generate-node
Run the node generator from the command line:
$ gen node
Generate a MIT license file. Runs the default task from generate-license.
Example
$ gen node:mit
Initialize a git repository, and add files and first commit. Runs the default task from generate-git.
Example
$ gen node:git
Generate a mocha unit test file. Runs the default task from generate-mocha.
Example
$ gen node:mocha
Install the latest devDependencies in package.json.
Example
$ gen node:npm
Prompt the user and use answers as context in templates
Example
$ gen node:ask
Prompt the user to choose which tasks to run.
Example
$ gen node:tasks
Prompt the user to choose which files to write to disk.
Example
$ gen node:files
Prompts the user for the dest to use. This is called by the default task.
Example
$ gen node:dest
Prompt to generate mocha unit tests. Runs the default task from generate-mocha.
Example
$ gen node:prompt-mocha
Prompt to initialize a git repository (also does git add and first commit). Runs the ask task from generate-git.
Example
$ gen node:prompt-git
Prompt to install the latest devDependencies in package.json.
Example
$ gen node:prompt-npm
Runs the default task to generate complete a node.js project, with all of the necessary files included. Runs the prompt-mocha, prompt-npm, and prompt-git tasks as task-dependencies.
Example
$ gen node
To use this generator programmatically, as a plugin or sub-generator, you must first install the generator locally.
Install with npm:
$ npm install generate-node
Then use in your project:
var node = require('generate-node');
Use as a plugin
In your generate project:
var generate = require('generate');
var app = generate();
app.use(node());
Use as a generator plugin
In your generate generator:
module.exports = function(app) {
app.use(node());
};
Use as a sub-generator
In your generate generator:
module.exports = function(app) {
// name the sub-generator whatever you want
app.register('foo', require('generate-node'));
};
You might also be interested in these projects:
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on April 27, 2016.
FAQs
Generate a node.js project, with everything you need to begin writing code and easily publish the project to npm.
The npm package generate-node receives a total of 2 weekly downloads. As such, generate-node popularity was classified as not popular.
We found that generate-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The U.S. government is rolling back software supply chain mandates, shifting from mandatory SBOMs and attestations to a risk-based approach.

Security News
crates.io adds a Security tab backed by RustSec advisories and narrows trusted publishing paths to reduce common CI publishing risks.

Research
/Security News
A Chrome extension claiming to hide Amazon ads was found secretly hijacking affiliate links, replacing creators’ tags with its own without user consent.