Automount
Foxman-Plugin
如何启用
- cd path/to/project(以启用 foxman 的工程)
- npm i --save-dev foxman-plugin-automount
- 在 foxman.config.js 中新增 plugins 的配置项
const Automount = ;moduleexports = ... plugins: tplUrlMap: '/index.html': 'index' '/index2.html': 'index' /** * 同步接口 xxx.ftl 映射实际url的接口,默认如下 * @param ftlPath(不带后缀) * @returns {string|*|XML|void} */ { return '/' + ftlPath + '.html'; } /** * 异步接口 xxx.json 映射实际url的接口,默认如下 * @param dataPath(不带后缀) * @returns {string|*|XML|void} */ { return '/' + dataPath + '.html'; } ...