Initial commit: GamePortrait 竖屏版 - 深色豪华主题

This commit is contained in:
li
2026-01-16 17:47:53 +08:00
commit 40976e4b45
26611 changed files with 2843638 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
const url = require('url')
const path = require('path')
const launch = require('launch-editor')
module.exports = (specifiedEditor, srcRoot, onErrorCallback) => {
if (typeof specifiedEditor === 'function') {
onErrorCallback = specifiedEditor
specifiedEditor = undefined
}
if (typeof srcRoot === 'function') {
onErrorCallback = srcRoot
srcRoot = undefined
}
srcRoot = srcRoot || process.cwd()
return function launchEditorMiddleware (req, res, next) {
const { file } = url.parse(req.url, true).query || {}
if (!file) {
res.statusCode = 500
res.end(`launch-editor-middleware: required query param "file" is missing.`)
} else {
launch(path.resolve(srcRoot, file), specifiedEditor, onErrorCallback)
res.end()
}
}
}
+24
View File
@@ -0,0 +1,24 @@
{
"name": "launch-editor-middleware",
"version": "2.6.0",
"description": "express middleware for launching editor",
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/yyx990803/launch-editor.git"
},
"keywords": [
"express",
"middleware",
"editor"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/yyx990803/launch-editor/issues"
},
"homepage": "https://github.com/yyx990803/launch-editor#readme",
"dependencies": {
"launch-editor": "^2.6.0"
}
}