Skip to content

Commit

Permalink
chore: clear cache-dir/commonjs directory before building new one (#9326
Browse files Browse the repository at this point in the history
)

* chore: clear cache-dir/commonjs directory before building new one

* split build into cleaning part - prebuild and actual build part
  • Loading branch information
pieh committed Oct 24, 2018
1 parent 5cd1dcc commit 2da538e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/gatsby/package.json
Expand Up @@ -174,12 +174,13 @@
"graphql": "^0.13.2"
},
"scripts": {
"build": "rimraf dist && npm run build:src && npm run build:internal-plugins && npm run build:rawfiles && npm run build:cjs",
"build": "npm run build:src && npm run build:internal-plugins && npm run build:rawfiles && npm run build:cjs",
"build:internal-plugins": "copyfiles -u 1 src/internal-plugins/**/package.json dist",
"build:rawfiles": "copyfiles -u 1 src/internal-plugins/**/raw_* dist",
"build:cjs": "babel cache-dir --out-dir cache-dir/commonjs --ignore **/__tests__",
"build:src": "babel src --out-dir dist --source-maps --ignore **/gatsby-cli.js,**/raw_*,**/__tests__",
"clean-test-bundles": "find test/ -type f -name bundle.js* -exec rm -rf {} +",
"prebuild": "rimraf dist && rimraf cache-dir/commonjs",
"prepare": "cross-env NODE_ENV=production npm run build",
"test-coverage": "node_modules/.bin/nyc --reporter=lcov --reporter=text npm test",
"watch": "rimraf dist && mkdir dist && npm run build:internal-plugins && npm run build:rawfiles && npm run build:src -- --watch"
Expand Down

0 comments on commit 2da538e

Please sign in to comment.