Skip to content

Commit

Permalink
Update scripts and config file names
Browse files Browse the repository at this point in the history
Before:
`npm run build:compile` -> compiles to `lib`
`npm run build:browser` -> uses `browser` config -> builds to `dist`
`npm run build:demo` -> uses `production` config -> builds to `demo`

After:
`npm run build:lib` -> builds to `lib`
`npm run build:dist` -> uses `dist` config -> builds to `dist`
`npm run build:demo` -> uses `demo` config -> builds to `demo`

Also, build dist in travis for extra error checking
  • Loading branch information
cookpete committed Oct 3, 2017
1 parent a33238c commit 920c602
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ node_js:
script:
- npm run lint
- npm run test
- npm run build:compile
- npm run build:lib
- npm run build:demo
- npm run build:dist
after_success:
- npm run coverage
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && sshpass -e scp -r -o stricthostkeychecking=no demo/* $DEPLOY_DEST
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"typings": "index.d.ts",
"scripts": {
"clean": "rimraf lib demo",
"build:demo": "cross-env NODE_ENV=production webpack --config webpack.production.babel.js",
"build:browser": "cross-env NODE_ENV=production webpack --config webpack.browser.babel.js",
"build:compile": "cross-env NODE_ENV=production babel src -d lib --ignore src/demo",
"start": "webpack-dev-server",
"lint": "standard --verbose | snazzy",
"test": "cross-env NODE_ENV=test babel-node ./node_modules/karma/bin/karma start test/karma.config.js",
"coverage": "codecov",
"build:lib": "cross-env NODE_ENV=production babel src -d lib --ignore src/demo",
"build:demo": "cross-env NODE_ENV=production webpack --config webpack.demo.babel.js",
"build:dist": "cross-env NODE_ENV=production webpack --config webpack.dist.babel.js",
"preversion": "npm run lint",
"version": "npm run update-changelog && npm run build:browser && git add CHANGELOG.md dist",
"version": "npm run update-changelog && npm run build:dist && git add CHANGELOG.md dist",
"update-changelog": "auto-changelog --package --template compact",
"prepublishOnly": "npm run build:compile && npm run build:browser",
"prepublishOnly": "npm run build:lib && npm run build:dist",
"postpublish": "npm run clean"
},
"repository": {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion webpack.browser.babel.js → webpack.dist.babel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'path'
import config, { minifyPlugins } from './webpack.production.babel'
import config, { minifyPlugins } from './webpack.demo.babel'

export default {
...config,
Expand Down

0 comments on commit 920c602

Please sign in to comment.