Bublé plugin for Metalsmith
npm install metalsmith-buble
Add the metalsmith-buble
field to your metalsmith.json
.
{
"plugins": {
"metalsmith-buble": {
"transforms": {
"modules": false,
"dangerousForOf": true
},
"sourceMap": "inline"
}
}
}
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.');
});
All Bublé options are available except for file
and source
that will be automatically set.
In addition the following option is supported:
Value: true
, false
or 'inline'
Default: false
true
generates a separate source map file with.map
extension, for exmaplescript.js.map
along withscript.js
.'inline'
appends an inline source map to the transformed file.
ISC License © 2017 Shinnosuke Watanabe