0.1.6 • Published 7 years ago

foxman-plugin-mock-control v0.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

MockControl

Foxman-Plugin

如何启用

  1. cd path/to/project(以启用 foxman 的工程)
  2. npm i --save-dev foxman-plugin-mock-control
  3. 在 foxman.config.js 中新增 plugins 的配置项
const MockControl = require('foxman-plugin-mock-control');
module.exports = {
    ...
    plugins: [
        new MockControl({
            /**
             * 在 mock json 的同目录下找,文件名一样 的 .js 文件
             * @param dataPath
             * @returns {string|*|XML|void}
             */
            mapJS: function (dataPath) {
                return dataPath.replace(/\.json$/, '.js');
            }
        })
    ],
    ...
}
1.0.0-0

7 years ago

1.0.0

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.2.0

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago