From b11abb564a133bf4d213cbebd6a1ec1c2331466a Mon Sep 17 00:00:00 2001 From: Il Harper Date: Sat, 9 Mar 2024 20:41:26 +0800 Subject: [PATCH] refactor: use `esbuild-register` --- packages/docs/docusaurus.config.js | 7 +------ packages/docs/package.json | 6 ++---- packages/engine-chronocat-api/package.json | 3 +-- packages/engine-chronocat-event/package.json | 3 +-- packages/red/package.json | 3 +-- packages/shell/package.json | 3 +-- 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/packages/docs/docusaurus.config.js b/packages/docs/docusaurus.config.js index 8b85f38..fdb0767 100644 --- a/packages/docs/docusaurus.config.js +++ b/packages/docs/docusaurus.config.js @@ -4,11 +4,6 @@ 'use strict' -require('ts-node').register({ - scope: true, - scopeDir: __dirname, - swc: true, - transpileOnly: true, -}) +require('esbuild-register/dist/node').register() module.exports = require('./config').config diff --git a/packages/docs/package.json b/packages/docs/package.json index 0728051..4c8413d 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -30,11 +30,9 @@ "@swc/core": "^1.3.78", "concurrently": "^8.2.1", "docusaurus-plugin-sass": "^0.2.5", + "esbuild-register": "^3.5.0", "raw-loader": "^4.0.2", - "sass": "^1.66.1", - "tosource": "^2.0.0-alpha.3", - "ts-node": "^10.9.1", - "typescript": "~5.1.0" + "sass": "^1.66.1" }, "browserslist": { "production": [ diff --git a/packages/engine-chronocat-api/package.json b/packages/engine-chronocat-api/package.json index e9507a4..201e2df 100644 --- a/packages/engine-chronocat-api/package.json +++ b/packages/engine-chronocat-api/package.json @@ -24,11 +24,10 @@ "@satorijs/element": "^2.5.1", "@types/mime": "^3.0.1", "concurrently": "^8.2.1", + "esbuild-register": "^3.5.0", "ipcman": "^0.1.3", "mime": "^3.0.0", "node-fetch": "^3.3.2", - "tosource": "^2.0.0-alpha.3", - "ts-node": "^10.9.1", "ts-toolbelt": "^9.6.0", "typescript": "~5.1.0" } diff --git a/packages/engine-chronocat-event/package.json b/packages/engine-chronocat-event/package.json index 22d7a10..8f932d5 100644 --- a/packages/engine-chronocat-event/package.json +++ b/packages/engine-chronocat-event/package.json @@ -23,10 +23,9 @@ "@chronocat/shell": "workspace:packages/shell", "@satorijs/element": "^2.5.1", "concurrently": "^8.2.1", + "esbuild-register": "^3.5.0", "ipcman": "^0.1.3", "node-fetch": "^3.3.2", - "tosource": "^2.0.0-alpha.3", - "ts-node": "^10.9.1", "ts-toolbelt": "^9.6.0", "typescript": "~5.1.0" } diff --git a/packages/red/package.json b/packages/red/package.json index 79b8569..0c3417d 100644 --- a/packages/red/package.json +++ b/packages/red/package.json @@ -27,8 +27,7 @@ }, "devDependencies": { "concurrently": "^8.2.1", - "tosource": "^2.0.0-alpha.3", - "ts-node": "^10.9.1", + "esbuild-register": "^3.5.0", "ts-toolbelt": "^9.6.0", "typescript": "~5.1.0" } diff --git a/packages/shell/package.json b/packages/shell/package.json index d34fbf8..85add9d 100644 --- a/packages/shell/package.json +++ b/packages/shell/package.json @@ -32,12 +32,11 @@ "busboy": "^1.6.0", "bytenode": "^1.5.3", "concurrently": "^8.2.1", + "esbuild-register": "^3.5.0", "js-yaml": "^4.1.0", "logiri": "^0.1.2", "node-fetch": "^3.3.2", "protobufjs": "^7.2.5", - "tosource": "^2.0.0-alpha.3", - "ts-node": "^10.9.1", "ts-toolbelt": "^9.6.0", "typescript": "~5.1.0", "typescript-json-schema": "^0.61.0",