用 Rollup 和 Buble 编译 ES6 代码

1,805 阅读1分钟


bubleup transpiles ESnext code
with the power of Rollup and Buble.

NPM version NPM downloads

tl;dr

$ bubleup
# is the same as
$ bubleup src/index.js -o index.js

Install

Usage

For full CLI usage please run bubleup -h, It's hard to describe some options in command line, so you can also configure them in package.json, eg:

{
  "bubleup": {
    "entry": "./path/to/my-entry.js"
  }
}

Alias

This is some feature which is similar to Webpack's alias, eg:

{
  "bubleup": {
    "alias": {
      "controllers": "./src/controllers"
    }
  }
}

Paths

This helps you import some file from the CDN (as using AMD), or set an alias to an external file, see more details in Rollup's WIKI.

API

import bubleup from 'bubleup'

bubleup(options).catch(e => console.log(e.stack))

License

MIT © EGOIST