refactor: 推翻舊架構, 進入 Vite 盛世!
* 所有的 CDN 依賴已全部 npm 化 * Webpack? 一邊去! Vite 太好用啦! * 將 Imports.ts 剔除 * 移除了大量的靜態文件 * 將 index.html 的部分代碼分離 * 修改 deno task * 移除了動態編譯頁面的支持 * ./static 引用全部變更為 npm 包引用
This commit is contained in:
@@ -8,7 +8,6 @@ import http from 'node:http'
|
||||
import https from 'node:https'
|
||||
import readline from 'node:readline'
|
||||
import process from "node:process"
|
||||
import transform from './compiler/transform.ts'
|
||||
import chalk from "chalk"
|
||||
|
||||
const app = express()
|
||||
@@ -34,18 +33,13 @@ ApiManager.initEvents()
|
||||
ApiManager.initAllApis()
|
||||
|
||||
httpServer.listen(config.server.listen)
|
||||
console.log(chalk.green("API & Web 服務已經開始運作"))
|
||||
|
||||
console.log(chalk.green("Web 頁面已編譯完成, 用時 " + await transform('./client', config.data_path + '/page_compiled') + "s"))
|
||||
|
||||
console.log(chalk.yellow("===== TheWhiteSilk Server ====="))
|
||||
console.log(chalk.yellow("b - 重新編譯 Web 頁面"))
|
||||
console.log(chalk.green("API & Web 服務已經開始運作"))
|
||||
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
})
|
||||
rl.on('line', async (text) => {
|
||||
if (text == "b")
|
||||
console.log(chalk.green("Web 頁面已編譯完成, 用時 " + await transform('./client', config.data_path + '/page_compiled') + "s"))
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user