Skip to content

Commit

Permalink
Exclude test from package and update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanhefner committed Sep 19, 2018
1 parent 18c1c98 commit a454779
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ coverage
examples
tools
src/.babelrc
src/index.test.js
**/*.test.js
rollup.config.js
*.sublime-project
*.sublime-workspace
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"clean": "rm -f index.js && rm -f constants.js && rm -fr es && rm -fr umd",
"prebuild": "npm run clean",
"build": "node ./tools/build.js",
"watch": "babel ./src -d . --ignore __tests__ --watch",
"watch": "babel ./src -d . --ignore __tests__,**/*.test.js --watch",
"prepare": "npm run build",
"prepublishOnly": "node ./tools/build.js",
"push-release": "git push origin master && git push --tags",
Expand Down
4 changes: 2 additions & 2 deletions tools/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ const exec = (command, extraEnv) => {

console.log('Building CommonJS modules ...');

exec('babel src -d . --ignore __tests__,*.test.js', {
exec('babel src -d . --ignore __tests__,**/*.test.js', {
BABEL_ENV: 'cjs'
});

console.log('\nBuilding ES modules ...');

exec('babel src -d es --ignore __tests__,*.test.js', {
exec('babel src -d es --ignore __tests__,**/*.test.js', {
BABEL_ENV: 'es'
});

Expand Down

0 comments on commit a454779

Please sign in to comment.