Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make yarn build command cross-platform #3747

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()
Loading