mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-23 16:11:24 +08:00
refactor: allow using server statically
將原本 "NeteaseCloudMusicApi/server" 掃描 modules 目錄的部分抽出 server.js, 改移到 main.js。這樣使用者就有辦法只載入 靜態的伺服器部分(不動態載入模組)。 這個 patch 的 breaking changes 不易發生。 可作為 patch version 發佈。
This commit is contained in:
+3
-3
@@ -4,7 +4,7 @@
|
||||
"description": "网易云音乐 NodeJS 版 API",
|
||||
"scripts": {
|
||||
"start": "node app.js",
|
||||
"test": "mocha -r intelli-espower-loader -t 20000 server.test.js --exit",
|
||||
"test": "mocha -r intelli-espower-loader -t 20000 server.test.js main.test.js --exit",
|
||||
"lint": "eslint \"**/*.{js,ts}\"",
|
||||
"lint-fix": "eslint --fix \"**/*.{js,ts}\"",
|
||||
"prepare": "husky install",
|
||||
@@ -26,7 +26,7 @@
|
||||
"音乐",
|
||||
"网易云音乐nodejs"
|
||||
],
|
||||
"main": "server.js",
|
||||
"main": "main.js",
|
||||
"types": "./interface.d.ts",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
@@ -78,4 +78,4 @@
|
||||
"prettier": "2.5.1",
|
||||
"typescript": "4.5.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user