Skip to content

Commit

Permalink
fix(debug): use esbuild only for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
beetcb committed Jul 25, 2021
1 parent 47b2c2d commit e6d6a6d
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"request": "launch",
"name": "Check In Test",
"skipFiles": ["<node_internals>/**"],
"preLaunchTask": "npm: build",
"preLaunchTask": "npm: build:debug",
"program": "${workspaceFolder}/internal/src/cli.ts",
"args": ["sign"],
"outFiles": ["${workspaceFolder}/**/*.js"]
},
{
"type": "pwa-node",
"request": "launch",
"name": "Test Score Notice Test",
"name": "Score Notice Test",
"skipFiles": ["<node_internals>/**"],
"preLaunchTask": "npm: build",
"program": "${workspaceFolder}/plugins/test-score-notice/src/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lib/src/**/*.[tj]s"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build:debug": "esbuild src/*.ts src/**/*.ts --outdir=lib --format=cjs --sourcemap"
},
"keywords": [
"今日校园",
Expand All @@ -29,4 +29,4 @@
"signale": "^1.4.0",
"tesseract.js": "^2.1.4"
}
}
}
4 changes: 3 additions & 1 deletion internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"files": [
"lib/src/**/*.[tj]s"
],
"scripts": {},
"scripts": {
"build:debug": "esbuild src/*.ts --outdir=lib --format=cjs --sourcemap"
},
"keywords": [],
"author": "",
"license": "MIT",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"postbootstrap": "npm run build && lerna bootstrap",
"docs": "node -e \"$(esbuild build/docs.ts --minify --format=cjs)\"",
"prebuild": "dprint fmt",
"build": "lerna exec -- esbuild src/**/*.ts --outdir=lib --platform=node --format=cjs --sourcemap",
"build": "tsc --build",
"build:debug": "lerna run build:debug",
"test": "jest",
"pub": "npm run build && env-cmd lerna publish",
"dry": "lerna exec -- npm pack && lerna exec -- rm -rf package *.tgz"
Expand Down
4 changes: 3 additions & 1 deletion plugins/check-in/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"files": [
"lib/src/**/*.[tj]s"
],
"scripts": {},
"scripts": {
"build:debug": "esbuild src/*.ts --outdir=lib --format=cjs --sourcemap"
},
"keywords": [],
"author": "",
"license": "MIT",
Expand Down
6 changes: 4 additions & 2 deletions plugins/test-score-notice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"files": [
"lib/src/**/*.[tj]s"
],
"scripts": {},
"scripts": {
"build": "esbuild src/*.ts --outdir=lib --format=cjs --sourcemap"
},
"keywords": [],
"author": "",
"license": "MIT",
Expand All @@ -16,4 +18,4 @@
"node-fetch": "^2.6.1"
},
"devDependencies": {}
}
}
1 change: 1 addition & 0 deletions plugins/test-score-notice/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import fetch from 'node-fetch'
;(async () => {
await handleCookie({
// @ts-ignore
preCookieURLArray: [
'https://jwglxt.whpu.edu.cn/rump_frontend/login/?next=https%3A%2F%2Fjwglxt.whpu.edu.cn%2Fsso%2Fjziotlogin',
'https://sec.whpu.edu.cn/rump_frontend/login/?next=https://jwglxt.whpu.edu.cn/sso/jziotlogin',
Expand Down
1 change: 0 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"compilerOptions": {
"lib": ["ESNext", "DOM"],
"emitDeclarationOnly": true,
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
Expand Down

0 comments on commit e6d6a6d

Please sign in to comment.