From c42dfc60e2c5c03bff755a4ffc2b82feb6987ec7 Mon Sep 17 00:00:00 2001 From: Bret Comnes Date: Thu, 9 Nov 2017 16:23:05 -0800 Subject: [PATCH] Add clean step to build --- package.json | 3 ++- script/release.js | 4 ---- yarn.lock | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 817a44ee0..60ca9ee7e 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "prestart": "run-s build", "version": "run-s release", "prepublish": "run-s build", - "build": "run-p build:*", + "build": "rimraf build && mkdirp build && run-p build:*", "build:bundle": "cross-env NODE_ENV=production webpack --config webpack.config.babel.js", "build:umd": "cross-env NODE_ENV=production webpack --config webpack.umd.config.babel.js", "prebuild": "mkdirp build", @@ -61,6 +61,7 @@ "preact-compat": "^3.15.0", "prettier": "^1.6.1", "raw-loader": "^0.5.1", + "rimraf": "^2.6.2", "serve": "^6.0.0", "source-map-loader": "^0.2.1", "url-loader": "^0.5.8", diff --git a/script/release.js b/script/release.js index 3d9b803ab..c682246c4 100644 --- a/script/release.js +++ b/script/release.js @@ -4,10 +4,6 @@ const version = require("../package.json").releaseVersion; console.log("Building new release for ", version); -console.log("Cleaning build folder"); -exec("rm -rf build"); -exec("mkdir -p build"); - exec("yarn"); exec("yarn build"); diff --git a/yarn.lock b/yarn.lock index 3ac99c31c..29d813d56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5249,7 +5249,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1, rimraf@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: