mirror of
https://github.com/docsifyjs/docsify.git
synced 2026-10-17 04:31:18 +08:00
Add NODE_MODULES_URL global
This commit is contained in:
@@ -34,8 +34,9 @@ function startServer(options = {}, cb = Function.prototype) {
|
||||
baseDir: path.resolve(__dirname, '../'),
|
||||
routes: {
|
||||
'/docs': path.resolve(__dirname, '../../docs'),
|
||||
'/lib': path.resolve(__dirname, '../../lib'),
|
||||
'/docs/changelog.md': './CHANGELOG.md',
|
||||
'/lib': path.resolve(__dirname, '../../lib'),
|
||||
'/node_modules': path.resolve(__dirname, '../../node_modules'),
|
||||
},
|
||||
},
|
||||
snippetOptions: {
|
||||
@@ -108,6 +109,9 @@ module.exports = {
|
||||
get LIB_URL() {
|
||||
return `${this.TEST_HOST}/lib`;
|
||||
},
|
||||
get NODE_MODULES_URL() {
|
||||
return `${this.TEST_HOST}/node_modules`;
|
||||
},
|
||||
TEST_HOST: `http://${serverConfig.host}:${serverConfig.port}`,
|
||||
},
|
||||
start: startServer,
|
||||
|
||||
Reference in New Issue
Block a user