diff --git a/package.json b/package.json index f05c406776..27ed3444c8 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "flow-bin": "^0.33.0", "lodash": "^4.15.0", "nyc": "^8.1.0", + "rimraf": "^2.5.4", "rollup": "^0.36.3", "rollup-plugin-babel": "^2.6.1", "rollup-plugin-node-resolve": "^2.0.0", @@ -41,8 +42,9 @@ "build": "rollup -c", "coverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json", "lint": "eslint src bin", + "clean": "rimraf lib", "flow": "flow", - "prepublish": "cross-env BABEL_ENV=production npm run build", + "prepublish": "npm run clean && cross-env BABEL_ENV=production npm run build", "preversion": "npm run test && npm run changelog", "test": "npm run lint && npm run flow && npm run build && npm run test-only", "test-only": "ava test",