rollup 523 Bytes
Newer Older
Mike Bostock's avatar
Mike Bostock committed
1 2 3
#!/usr/bin/env node

var rollup = require("rollup"),
Mike Bostock's avatar
Mike Bostock committed
4
    ascii = require("rollup-plugin-ascii"),
Mike Bostock's avatar
Mike Bostock committed
5 6 7 8
    nodeResolve = require("rollup-plugin-node-resolve");

rollup.rollup({
  entry: "index.js",
Mike Bostock's avatar
Mike Bostock committed
9
  plugins: [nodeResolve({jsnext: true}), ascii()]
Mike Bostock's avatar
Mike Bostock committed
10 11
}).then(function(bundle) {
  return bundle.write({
Mike Bostock's avatar
Mike Bostock committed
12
    banner: process.argv[2],
Mike Bostock's avatar
Mike Bostock committed
13 14 15 16 17 18 19 20 21 22 23
    format: "umd",
    moduleName: "d3",
    dest: "build/d3.js"
  });
}).then(function() {
  console.warn("↳ build/d3.js");
}).catch(abort);

function abort(error) {
  console.error(error.stack);
}