Skip to content

Commit 11e6f23

Browse files
Clean output directory on build
Install rimraf for cross-OS compatible directory deletion.
1 parent 0935efd commit 11e6f23

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
"lib": "lib"
1010
},
1111
"scripts": {
12-
"build": "babel src -d lib",
12+
"build": "npm run clean && babel src -d lib",
13+
"clean": "rimraf lib/*",
1314
"test": "echo \"Error: no test specified\" && exit 1"
1415
},
1516
"dependencies": {},
1617
"devDependencies": {
1718
"@babel/cli": "^7.0.0-beta.54",
1819
"@babel/core": "^7.0.0-beta.54",
19-
"@babel/preset-env": "^7.0.0-beta.54"
20+
"@babel/preset-env": "^7.0.0-beta.54",
21+
"rimraf": "^2.6.2"
2022
}
2123
}

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ ret@~0.1.10:
15021502
version "0.1.15"
15031503
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
15041504

1505-
rimraf@^2.6.1:
1505+
rimraf@^2.6.1, rimraf@^2.6.2:
15061506
version "2.6.2"
15071507
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
15081508
dependencies:

0 commit comments

Comments
 (0)