Skip to content

Commit

Permalink
fix: broken binary (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanseltime authored Dec 4, 2024
1 parent 1f7bc8b commit f29199b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 23 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
- run: npm ci
- run: npm run build --if-present
- run: npm test
- name: Verify the command
run: |
node $(jq -r '.bin' package.json) --version
publish:
name: npm-publish
Expand Down
31 changes: 10 additions & 21 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
{
"module": {
"type": "commonjs",
"strict": true,
"strictMode": true
},
"jsc": {
"parser": {
"syntax": "typescript"
"jsc": {
"loose": true,
"minify": {
"compress": {
"unused": true
},
"mangle": true
}
},
"transform": null,
"target": "es2018",
"loose": true,

"minify": {
"compress": {
"unused": true
},
"mangle": true
}
},
"minify": true
}
"minify": true
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
"description": "Compile your TypeScript with tsconfig.json using swc",
"bin": "dist/cli.js",
"scripts": {
"build": "swc src -d dist",
"typeCheck": "npx tsc --noEmit",
"build": "npm run typeCheck && npm run tswc -- src -d dist --strip-leading-paths",
"pretest": "npm run build",
"prepublishOnly": "npm run build",
"test": "vitest run",
"prepare": "npx lint-staged"
"prepare": "npx lint-staged",
"tswc": "ts-node src/cli.ts --"
},
"files": [
"dist"
Expand Down

0 comments on commit f29199b

Please sign in to comment.