module
Generate the minimal skeleton for a new node.js module/package.
Last updated a year ago by lukehorvat .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install module 
SYNC missed versions from official npm registry.

module npm version

Generate the minimal skeleton for a new node.js module/package.

Usage

For example, to create a module in the current working directory:

$ npx module

To create a module in another directory, specify a relative or absolute path:

$ npx module foo

The --system flag can be provided to control whether the module system is ESM (the default if flag not specified) or CommonJS:

$ npx module foo --system esm
$ npx module foo --system cjs

And the --identifier flag can be provided to control whether the module system is identified by file extension (the default if flag not specified), package.json type field, or implicitly from code syntax:

$ npx module foo --system esm --identifier file-ext
$ npx module foo --system cjs --identifier package-type
$ npx module foo --system esm --identifier syntax

To understand these flags better, see Determining module system in the node.js docs.

Current Tags

  • 2.0.0                                ...           latest (a year ago)

10 Versions

  • 2.0.0                                ...           a year ago
  • 1.2.5                                ...           11 years ago
  • 1.2.4                                ...           11 years ago
  • 1.2.3                                ...           11 years ago
  • 1.2.2                                ...           11 years ago
  • 1.2.1                                ...           11 years ago
  • 1.2.0                                ...           11 years ago
  • 1.1.0                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
  • 0.0.1                                ...           15 years ago
Maintainers (1)
Downloads
Total 86
Today 1
This Week 13
This Month 69
Last Day 1
Last Week 13
Last Month 16
Dependencies (3)
Dev Dependencies (4)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE