module
Generate the minimal skeleton for a new node.js module/package.
Last updated 5 months ago by lukehorvat .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (5 months ago)

10 Versions

  • 2.0.0                                ...           5 months ago
  • 1.2.5                                ...           10 years ago
  • 1.2.4                                ...           10 years ago
  • 1.2.3                                ...           10 years ago
  • 1.2.2                                ...           10 years ago
  • 1.2.1                                ...           10 years ago
  • 1.2.0                                ...           10 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.0.1                                ...           14 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (4)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |