太记如何用命令行启动旧wiki
已解决
讨论
-
靠,被自己蠢到了。
在每个wiki文件夹里都有一个
package.json
文件,用vscode就可以启动。早期的版本可能没写启动代码。也就是server那一行。可以复制下面的粘贴过去。{ "scripts": { "zx-build": "zx ./scripts/build-wiki.mjs", "server": "npx cross-env TIDDLYWIKI_PLUGIN_PATH='./plugins' TIDDLYWIKI_THEME_PATH='./themes' TIDDLYWIKI_LANGUAGE_PATH='./languages' npx tiddlywiki . --listen port=8080", "buildonline": "node -e \"require('./scripts/build').buildOnlineHTML('public-dist', 'index.html');\"", "buildoffline": "node -e \"require('./scripts/build').buildOfflineHTML('public-dist', 'offline.html');\"", "buildlibrary": "node -e \"require('./scripts/build').buildLibrary('[prefix[$:/]!prefix[$:/plugins/tiddlywiki/]!prefix[$:/themes/tiddlywiki/]!prefix[$:/languages/]!tag[$:/tags/PluginLibrary]!prefix[$:/plugins/kookma]]', 'public-dist/library');\"", "clean": "rimraf public-dist" }, "devDependencies": { "cross-env": "7.0.3", "html-minifier-terser": "7.2.0", "shx": "0.3.4", "tiddlywiki": "^5.3.4", "uglify-js": "3.18.0", "workbox-cli": "7.1.0", "zx": "^8.1.3", "rimraf": "^5.0.7" } }
用vscode的终端执行
npm run server
命令就可以在本地打开了。 -
-