metalsmith-buble

1.0.2 • Public • Published

metalsmith-buble

npm version Build Status Build status Coverage Status

Bublé plugin for Metalsmith

Installation

Use npm.

npm install metalsmith-buble

Usage

CLI

Add the metalsmith-buble field to your metalsmith.json.

{
  "plugins": {
    "metalsmith-buble": {
      "transforms": {
        "modules": false,
        "dangerousForOf": true
      },
      "sourceMap": "inline"
    }
  }
}

API

const Metalsmith = require('metalsmith');
const buble = require('metalsmith-buble');
 
new Metalsmith('./source')
.use(buble({
  sourceMap: true
}))
.build((err, files) => {
  if (err) {
    throw err;
  }
 
  console.log('Completed.');
});

Options

All Bublé options are available except for file and source that will be automatically set.

In addition the following option is supported:

options.sourceMap

Value: true, false or 'inline'
Default: false

  • true generates a separate source map file with .map extension, for exmaple script.js.map along with script.js.
  • 'inline' appends an inline source map to the transformed file.

License

ISC License © 2017 Shinnosuke Watanabe

Package Sidebar

Install

npm i metalsmith-buble

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • shinnn