metalsmith-rollup
A Rollup plugin for Metalsmith
Last updated a year ago by attilab .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install metalsmith-rollup 
SYNC missed versions from official npm registry.

metalsmith-rollup

Build status codecov.io

A Rollup plugin for Metalsmith.

Installation

npm install --save-dev metalsmith-rollup

Usage

Currently only the JavaScript API is supported. CLI Usage via metalsmith.json is in the works.

In your build file:

const Metalsmith = require('metalsmith')
const rollup = require('metalsmith-rollup')

Metalsmith(__dirname).
  use(rollup({
    input: 'src/js/main.js', // Entry point
    output: {
      dest: 'js/bundle.js' // This will be placed under "build/"
    }
  })).
  build()

Source map generation is supported. Processed source files can be ignored automatically by passing ignoreSources option to the plugin:

Metalsmith(__dirname).
  use(rollup({
    input: 'src/js/main.js',
    output: {
      dest: 'js/bundle.js',
      sourcemap: true
    }
  }, {
    ignoreSources: true
  })).
  build()

Roadmap

Planned features

  • Support for CLI usage via rollup.config.js
  • Support for source maps
  • Test coverage

License

Copyright 2016 Attila Beregszaszi, MIT licensed, see LICENSE for details.

Current Tags

  • 2.0.0                                ...           latest (a year ago)

4 Versions

  • 2.0.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |