Skip to content

Commit

Permalink
Ensure build output is cleaned before building
Browse files Browse the repository at this point in the history
  • Loading branch information
Acconut committed Jan 16, 2025
1 parent 72e12ad commit 8226f70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@
"url-parse": "^1.5.7"
},
"scripts": {
"clean": "rm -rf dist lib.cjs lib.esm",
"build-test-bundle": "mkdir -p dist && browserify test/spec/browser-index.cjs -d -o dist/browser-test-bundle.js",
"build-bundle": "mkdir -p dist && browserify lib.cjs/browser/index.js -s tus -d | exorcist ./dist/tus.js.map > dist/tus.js",
"build-minify": "uglifyjs ./dist/tus.js -o ./dist/tus.min.js --compress --mangle --source-map \"content='./dist/tus.js.map',url='tus.min.js.map'\"",
"build-transpile-esm": "tsc --project tsconfig-esm.json && echo '{\"type\":\"module\"}' > lib.esm/package.json",
"build-transpile-cjs": "tsc --project tsconfig-cjs.json && echo '{\"type\":\"commonjs\"}' > lib.cjs/package.json",
"build-transpile": "npm-run-all build-transpile-esm build-transpile-cjs",
"build": "npm-run-all build-transpile build-bundle build-minify build-test-bundle",
"build": "npm-run-all clean build-transpile build-bundle build-minify build-test-bundle",
"watch-bundle": "chokidar --initial \"lib/**/*\" -c \"npm run build-bundle\"",
"watch-test-bundle": "chokidar --initial \"test/spec/**/*\" -c \"npm run build-test-bundle\"",
"watch-transpile": "chokidar --initial \"lib/**/*\" -c \"npm run build-transpile\"",
Expand Down

0 comments on commit 8226f70

Please sign in to comment.