Skip to content

Commit

Permalink
Tweak example rollup builds
Browse files Browse the repository at this point in the history
(Still not working without rollup/rollup-plugin-commonjs#225)
  • Loading branch information
marijnh committed Sep 7, 2017
1 parent 713d570 commit dafc571
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bin/build-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let globals = {}, external = []
})

let options = {
entry: process.argv[2],
input: process.argv[2],
plugins: [
require("rollup-plugin-node-resolve")({main: true, preferBuiltins: false}),
require("rollup-plugin-json")(),
Expand Down
19 changes: 12 additions & 7 deletions bin/build-library.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
const {rollup} = require("rollup")

let plugins = [
require("rollup-plugin-node-resolve")({main: true}),
require("rollup-plugin-commonjs")(),
require("rollup-plugin-buble")()
]

if (process.env.NODE_ENV != "development")
plugins.push(require("rollup-plugin-uglify")())


let options = {
entry: "bin/library.js",
plugins: [
require("rollup-plugin-node-resolve")({main: true}),
require("rollup-plugin-commonjs")(),
require("rollup-plugin-buble")(),
require("rollup-plugin-uglify")()
],
input: "bin/library.js",
plugins,
format: "iife"
}

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
"moduleserve": "^0.8.0",
"mold-template": "^2.0.0",
"punycode": "^1.4.0",
"rollup": "^0.46.0",
"rollup": "^0.49.0",
"rollup-plugin-buble": "^0.15.0",
"rollup-plugin-commonjs": "^6.0.1",
"rollup-plugin-commonjs": "^8.2.0",
"rollup-plugin-json": "^2.3.0",
"rollup-plugin-node-resolve": "^2.1.1",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "^2.0.1"
},
"scripts": {
Expand Down

0 comments on commit dafc571

Please sign in to comment.