Skip to content

Commit

Permalink
Two outputs: ES6 and UMD
Browse files Browse the repository at this point in the history
  • Loading branch information
matiboy committed Feb 15, 2018
1 parent 5dcfbe1 commit cd3888f
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 11 deletions.
6 changes: 6 additions & 0 deletions build/index.esm.js

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

1 change: 1 addition & 0 deletions build/index.esm.js.map

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

1 change: 0 additions & 1 deletion build/index.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion build/index.js → build/index.umd.js

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

1 change: 1 addition & 0 deletions build/index.umd.js.map

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

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "axcess-common",
"version": "1.0.1",
"description": "Axcess common modules",
"main": "build/index.js",
"main": "build/index.umd.js",
"module": "build/index.esm.js",
"scripts": {
"test": "jest"
},
Expand All @@ -25,8 +26,8 @@
},
"husky": {
"hooks": {
"pre-commit": "npm test",
"pre-push": "npm version patch && ./node_modules/.bin/rollup -c rollup.config.js"
"pre-commit": "./node_modules/.bin/rollup -c rollup.config.js && npm test",
"pre-push": "npm version patch"
}
}
}
14 changes: 9 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
export default {
input: 'src/index.js',
output: {
file: 'build/index.js',
output: [{
file: 'build/index.umd.js',
format: 'umd',
name: 'axcessCommon',
sourcemap: true
}
}
},
{
file: 'build/index.esm.js',
format: 'es',
}],
sourcemap: true
}
2 changes: 1 addition & 1 deletion src/history/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {addToHistoryN, addToHistory} = require('../../build/index')
const {addToHistoryN, addToHistory} = require('../../build/index.umd')

describe('History', () => {
describe('history builder', () => {
Expand Down

0 comments on commit cd3888f

Please sign in to comment.