JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23023
  • Score
    100M100P100Q128720F
  • License MIT

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

Package Exports

  • module
  • module/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (module) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.