mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-12-02 03:59:19 +08:00
Add NODE_MODULES_URL global
This commit is contained in:
parent
78c2a9d7b8
commit
cea9129c11
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user