Skip to content

Commit

Permalink
refactor: replace cjs symlinks with copy at build time
Browse files Browse the repository at this point in the history
  • Loading branch information
goosewobbler committed Feb 13, 2024
1 parent 6fa8834 commit bdc24e7
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 524 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@
"scripts": {
"init-dev": "pnpm i --filter=\\!fixture-\\* -r && husky install",
"ci": "pnpm i && pnpm build && pnpm test && pnpm lint && pnpm format:check",
"clean": "pnpx rimraf ./node_modules pnpm-lock.yaml ./dist",
"clean": "pnpx rimraf ./node_modules pnpm-lock.yaml ./dist ./src/cjs/preload.ts ./src/cjs/main.ts ./src/cjs/constants.ts ./src/cjs/types.ts",
"clean:dist": "pnpx rimraf ./dist",
"clean:all": "pnpm clean && pnpm -r --reverse clean",
"build": "pnpm build:esm && pnpm build:cjs",
"build:esm": "tsc",
"build:cjs": "tsc --build --verbose tsconfig.cjs.json",
"build:cjs": "pnpm build:cjs:copy && pnpm build:cjs:compile",
"build:cjs:copy": "cp -f ./src/preload.ts ./src/cjs/preload.ts && cp -f ./src/main.ts ./src/cjs/main.ts && cp -f ./src/preload.ts ./src/cjs/preload.ts && cp -f ./src/constants.ts ./src/cjs/constants.ts && cp -f ./src/types.ts ./src/cjs/types.ts",
"build:cjs:compile": "tsc --build --verbose tsconfig.cjs.json",
"lint": "cross-env ESLINT_USE_FLAT_CONFIG=true eslint \"**/*.{j,mj,cj,t}s\"",
"lint:fix": "cross-env ESLINT_USE_FLAT_CONFIG=true eslint \"**/*.{j,mj,cj,t}s\" --fix",
"format": "prettier --write \"**/*.{j,t}s\" \"**/*.{yml,md,json}\"",
Expand Down
1 change: 0 additions & 1 deletion src/cjs/constants.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/cjs/main.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/cjs/preload.ts

This file was deleted.

Loading

0 comments on commit bdc24e7

Please sign in to comment.