0.11.6 • Published 9 months ago

modulestrap v0.11.6

Weekly downloads
115
License
ISC
Repository
-
Last release
9 months ago

modulestrap

Social Media Photo by Danielle MacInnes on Unsplash

A basic JS module bootstrap: npx modulestrap project-name


The goal of this binary module is to bootstrap any JS module that would like to land on browsers, as well as NodeJS.

modulestrap project-name
  --babel      # to transpile for older browsers
  --cover      # to include coverage tools
  --node       # to create a NodeJS only module
  --ungap      # to include polyfills
  --force      # to overwrite existent projects
  --ucjs       # use ucjs instead of ascjs
  --no-default # to avoid exporting module.default
  --no-interop # alias for --no-default

Accordingly with the passed flags, the binary will create project-name and initialize it with most common tools to create dual modules.

Example / How to

npx modulestrap my-project --babel
cd my-project
code .
# write your module in ./esm/ folder
# the `index.js` is already there
# once you've done
npm run build

Above procedure will create all files for both CommonJS and ESM module + it will transpile to index.js and minify to min.js for browsers.

It is suggested to write a test too, either via --cover flag, or manually.

At that point, you can publish to npm your module.

0.11.5

11 months ago

0.11.6

9 months ago

0.11.4

12 months ago

0.11.2

1 year ago

0.11.3

1 year ago

0.11.0

3 years ago

0.11.1

3 years ago

0.10.1

3 years ago

0.10.0

3 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago