Skip to content

Commit

Permalink
Move CommonJS build back into package root
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Aug 23, 2017
1 parent 97b49cb commit aa25efc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cjs
es
node_modules
umd
/*.js
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"createHashHistory.js",
"createMemoryHistory.js",
"createTransitionManager.js",
"cjs",
"es",
"index.js",
"umd"
],
"main": "cjs/index.js",
"module": "index.js",
"main": "index.js",
"module": "es/index.js",
"scripts": {
"start": "webpack-dev-server -d --content-base ./ --history-api-fallback --inline modules/index.js",
"build": "node ./tools/build.js",
Expand Down
10 changes: 5 additions & 5 deletions tools/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ const exec = (command, extraEnv) =>
env: Object.assign({}, process.env, extraEnv)
})

console.log('\nBuilding ES modules ...')
console.log('Building CommonJS modules ...')

exec('babel modules -d . --ignore __tests__', {
BABEL_ENV: 'es'
BABEL_ENV: 'cjs'
})

console.log('Building CommonJS modules ...')
console.log('\nBuilding ES modules ...')

exec('babel modules -d cjs --ignore __tests__', {
BABEL_ENV: 'cjs'
exec('babel modules -d es --ignore __tests__', {
BABEL_ENV: 'es'
})

console.log('\nBuilding history.js ...')
Expand Down

0 comments on commit aa25efc

Please sign in to comment.