From 12f1a8eed8863a1cc6a5703e6bc5f43283ea547c Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 11 Sep 2017 07:37:36 -0400 Subject: [PATCH] Clean target directory before compiling overlay (#3102) * Clean target directory before compiling overlay * Use rimraf --- packages/react-error-overlay/package.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index b3b9365aeb3..289f72126bf 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -5,10 +5,10 @@ "main": "lib/index.js", "scripts": { "prepublishOnly": "npm run build:prod && npm test", - "start": "cross-env NODE_ENV=development npm run build -- --watch", + "start": "rimraf lib/ && cross-env NODE_ENV=development npm run build -- --watch", "test": "flow && jest", - "build": "babel src/ -d lib/", - "build:prod": "cross-env NODE_ENV=production babel src/ -d lib/" + "build": "rimraf lib/ && babel src/ -d lib/", + "build:prod": "rimraf lib/ && cross-env NODE_ENV=production babel src/ -d lib/" }, "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", @@ -53,7 +53,8 @@ "eslint-plugin-react": "7.1.0", "flow-bin": "0.52.0", "jest": "20.0.4", - "jest-fetch-mock": "1.2.1" + "jest-fetch-mock": "1.2.1", + "rimraf": "^2.6.1" }, "jest": { "setupFiles": [