pn

papara-node

A template for developing npm package that supports multiple module format(CommonJS, ESM, UMD)

Showing:

Popularity

Downloads/wk

5

GitHub Stars

18

Maintenance

Last Commit

6d ago

Contributors

2

Package

Dependencies

0

Size (min+gzip)

0.2KB

License

MIT

Type Definitions

Built-In

Tree-Shakeable

No?

Categories

Readme

TypeScript npm Package Template

A template for developing a npm package that supports multiple module formats (CommonJS, ES Modules and UMD).

File Structure

src/ # Source files written in TypeScript
  - moduleA.ts
  - moduleB.ts
  - index.ts
lib/ # CommonJS format (`module.exports/require`) JS files
  - moduleA.js
  - moduleB.js
  - index.js
esm/ # ES Modules format (`import/export`) JS files
  - moduleA.js
  - moduleB.js
  - index.js
umd/ # UMD format, bundled JS file
  - my-typescript-package.js

How to Develop

$ npm install
$ npm run build # generates `lib`, `esm`, and `umd`

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100