Skip to content

Commit

Permalink
Make yarn build command cross-platform (#3747)
Browse files Browse the repository at this point in the history
* Make npm build command cross-platform

* Update scripts/clean.cjs

Co-authored-by: katspaugh <381895+katspaugh@users.noreply.github.com>

---------

Co-authored-by: katspaugh <381895+katspaugh@users.noreply.github.com>
  • Loading branch information
alexanderleecii and katspaugh authored Jun 17, 2024
1 parent 741f71c commit 08afa79
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@
}
},
"scripts": {
"clean": "node ./scripts/clean.cjs",
"build:dev": "tsc -w --target ESNext",
"build": "rm -rf dist && tsc && rollup -c",
"build": "npm run clean && tsc && rollup -c",
"prepublishOnly": "npm run build",
"lint": "eslint --ext .ts src --fix",
"lint:report": "eslint --output-file eslint_report.json --format json --ext .ts src",
Expand Down
9 changes: 9 additions & 0 deletions scripts/clean.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const path = require('path')
const fs = require('fs')

const run = () => {
const distPath = path.join(__dirname, '../dist')
fs.rmSync(distPath, { recursive: true, force: true })
}

run()

0 comments on commit 08afa79

Please sign in to comment.