Skip to content

Commit

Permalink
Rework builds
Browse files Browse the repository at this point in the history
This allows users to import only the history they need instead of
relying on tree-shaking to get rid of code they don't. It also adds
singleton instances to both browser and hash history, which makes sense
since the library runs in the context of a single web page.
  • Loading branch information
mjackson committed Dec 7, 2019
1 parent e2833f7 commit 5f19f4b
Show file tree
Hide file tree
Showing 41 changed files with 1,805 additions and 1,462 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/build/
/fixtures/*/history.js
/node_modules/

node_modules/
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ jobs:
script: echo "Releasing $TRAVIS_TAG to npm with tag \"$NPM_TAG\" ..."
deploy:
provider: npm
skip_cleanup: true
tag: "$NPM_TAG"
edge: true
cleanup: false
email: [email protected]
api_key: "$NPM_TOKEN"
api_token: "$NPM_TOKEN"
src: "build/history"
tag: "$NPM_TAG"
on:
tags: true
11 changes: 9 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,20 @@ module.exports = function(config) {
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
loader: 'babel-loader',
options: {
presets: [['@babel/preset-env', { loose: true }]],
plugins: ['babel-plugin-dev-expression']
}
}
]
},
resolve: {
alias: {
history$: path.resolve(__dirname, 'modules/index.js')
history$: path.resolve(
__dirname,
'packages/history/modules/history.js'
)
}
},
plugins: [
Expand Down
Loading

0 comments on commit 5f19f4b

Please sign in to comment.