hc-honeypack-auto-module-plugin

0.1.0 • Public • Published
var MyPlugin = require('@ali/auto-router-plugin');
new MyPlugin({
  basePath: path.resolve(process.cwd(),'./assets'), //前端目录的base路径
  modelsPath: path.resolve(process.cwd(),'./assets/models'), // models目录的路径
  scenesPath: path.resolve(process.cwd(),'./assets/scenes'), // scenes目录的路径
  extensions: ['jsx', 'js']  // 识别文件类型
})

AutoRouter.js

module.exports = {
  "./scenes/algorithm/add.jsx": require('./scenes/algorithm/add.jsx'),
  "./scenes/algorithm/add_new.jsx": require('./scenes/algorithm/add_new.jsx'),
  "./scenes/algorithm/list.jsx": require('./scenes/algorithm/list.jsx')
}

AutoModel.js

module.exports = {
  "./models/alg_category.js": require('./models/alg_category.js'),
  "./models/alg_define.js": require('./models/alg_define.js'),
  "./models/alg_inst.js": require('./models/alg_inst.js')
}

Readme

Keywords

none

Package Sidebar

Install

npm i hc-honeypack-auto-module-plugin

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

7.23 kB

Total Files

6

Last publish

Collaborators

  • baqian