0.9.3 • Published 7 months ago

postinstall-js v0.9.3

Weekly downloads
8
License
MIT
Repository
github
Last release
7 months 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

7 months ago

0.9.2

11 months ago

0.9.0

1 year ago

0.9.1

1 year ago

0.7.2

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.0

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago