0.9.3 • Published 2 years ago

postinstall-js v0.9.3

Weekly downloads
8
License
MIT
Repository
github
Last release
2 years ago

postinstall-js

This is a postinstall command plugin.

It runs babel-preset-env and babel-preset-minify on inputs, and concatenate them on output.

To transform inputs using browserify, please check postinstall-browserify.

Usage

The plugin can be called directly, or through postinstall.

Directly:

require('postinstall-js')(inputs, output, options).then(function() {
 // done
});

Options

browsers

A Browserslist query string

minify

Pass minify: false to disable minification.

comments

By default, when minify is active, babel comments option is set to false.

modules

By default modules: false is passed to babel-preset-env.

cacheDir

A path to a cache directory must be set to enable cache.

extending native elements

Note that babel 7 and @babel/plugin-transform-classes only support this type of constructor overriding:

class HTMLMyCustomElement extends HTMLElement {
 constructor(me) {
  me = super(me);
  me.init();
  return me;
 }
 init() {}
}

Caveats

Support for source maps is not available and will be added eventually.

0.9.3

2 years ago

0.9.2

2 years ago

0.9.0

2 years ago

0.9.1

2 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.0

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago