Skip to content

Commit

Permalink
update build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancahill committed Oct 9, 2018
1 parent 0b37828 commit febea3e
Show file tree
Hide file tree
Showing 4 changed files with 548 additions and 543 deletions.
19 changes: 8 additions & 11 deletions package.json
Expand Up @@ -18,7 +18,7 @@
},
"homepage": "https://github.com/nathancahill/Split.js#readme",
"devDependencies": {
"buble": "^0.15.2",
"buble": "^0.19",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^14.0.0",
"eslint-plugin-compat": "^1.0.2",
Expand All @@ -28,21 +28,18 @@
"grunt": "1.0.1",
"grunt-cli": "1.2.0",
"grunt-contrib-jasmine": "1.1.0",
"gzip-size-cli": "^2.0.0",
"gzip-size-cli": "^3.0.0",
"jasmine": "2.6.0",
"rollup": "^0.41.6",
"rollup-multiple": "^0.41.6",
"rollup-plugin-buble": "^0.15.0",
"rollup-plugin-uglify": "^2.0.0",
"rollup-watch": "^3.2.2",
"opencollective": "^1.0.3",
"purgecss": "^1.1.0"
"rollup": "^0.66",
"rollup-plugin-buble": "^0.19",
"rollup-plugin-uglify": "^6.0.0",
"opencollective": "^1.0.3"
},
"scripts": {
"lint": "eslint src",
"test": "npm run lint && npm run build && grunt jasmine",
"build": "rollup-multiple -c && npm run size",
"watch": "rollup-multiple -cw",
"build": "rollup -c && npm run size",
"watch": "rollup -cw",
"size": "echo \"gzip size: $(gzip-size --raw $npm_package_minified_main) bytes\"",
"postinstall": "opencollective postinstall"
},
Expand Down
23 changes: 14 additions & 9 deletions rollup.config.js
@@ -1,23 +1,28 @@

import buble from 'rollup-plugin-buble'
import uglify from 'rollup-plugin-uglify'
import { uglify } from 'rollup-plugin-uglify'

const pkg = require('./package.json')

const common = {
entry: 'src/split.js',
const output = {
format: 'umd',
moduleName: 'Split',
file: 'split.js',
name: 'Split',
banner: `/*! Split.js - v${pkg.version} */\n`,
}

export default [Object.assign({}, common, {
dest: 'split.js',
export default [{
input: 'src/split.js',
output,
plugins: [
buble(),
],
}), Object.assign({}, common, {
dest: 'split.min.js',
}, {
input: 'src/split.js',
output: {
...output,
file: 'split.min.js',
},
plugins: [
buble(),
uglify({
Expand All @@ -26,4 +31,4 @@ export default [Object.assign({}, common, {
},
}),
],
})]
}]

0 comments on commit febea3e

Please sign in to comment.