我想在我的系统中使用离线 sails.js 文档。
sails.js 的文档保存在链接 Sails.js Documentation 中.
正如他们提到的,他们使用 doc-templater构建文档。我在 Node REPL 中尝试了下面的代码。
require('doc-templater')().build({
remote: 'git@github.com:balderdashy/sails.git',
remoteSubPath: '',
cachePath: '/code/sandbox/doctemplatertest/foo/bar/cache/',
htmlDirPath: '/code/sandbox/doctemplatertest/foo/bar/html',
jsMenuPath: '/code/sandbox/doctemplatertest/foo/bar.jsmenu'
}, function (e,r) {
if (e) {console.log('ERROR:\n',require('util').inspect(e, false, null));}
else console.log('RESULT:\n',require('util').inspect(r, false, null));
});`
但是它不起作用;我得到这个结果:
RESULT:
[]
undefined
任何人都可以展示它的工作方式吗?
最佳答案
看起来他们从来没有让这个模块正常工作: https://github.com/balderdashy/sails-docs/issues/523#issuecomment-136823015
或者,您可以克隆文档网站的 git 存储库: https://github.com/balderdashy/www.sailsjs.org
并用 sails 来运行它?
关于javascript - 如何构建 sails.js 离线文档?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33009603/