Skip to content

Commit

Permalink
Inline is-mergeable-object in the CJS build, too
Browse files Browse the repository at this point in the history
Also make the rollup build even quicker by spitting out all the outputs in one go
  • Loading branch information
TehShrike committed Jun 14, 2017
1 parent 1e016af commit 0b34e6e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,16 @@
},
"main": "dist/umd.js",
"module": "dist/es.js",
"browser": "index.js",
"browser": "dist/cjs.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"build": "npm run build:umd && npm run build:es",
"build:umd": "rollup -c --format umd --output dist/umd.js",
"build:es": "rollup -c --format es --output dist/es.js",
"test": "tap test/*.js && jsmd README.markdown"
},
"dependencies": {
"is-mergeable-object": "~1.0.3"
"build": "rollup -c",
"test": "npm run build && tap test/*.js && jsmd README.markdown"
},
"devDependencies": {
"is-mergeable-object": "~1.0.3",
"jsmd": "0.3.1",
"rollup": "0.41.6",
"rollup-plugin-commonjs": "8.0.2",
Expand Down
8 changes: 7 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'

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

export default {
entry: 'index.js',
moduleName: 'deepmerge',
plugins: [
commonjs(),
resolve()
],
dest: 'bundle.js'
targets: [
{ dest: pkg.main, format: 'umd' },
{ dest: pkg.module, format: 'es' },
{ dest: pkg.browser, format: 'cjs' },
]
}

0 comments on commit 0b34e6e

Please sign in to comment.