@which-route/vue-router-reader

0.1.6 • Public • Published

@which-route/vue-router-reader

  • A node tool for reading a vue program's router.

install

npm install @which-route/vue-router-reader --save / yarn add @which-route/vue-router-reader

usage

const routerReader = require('@which-route/vue-router-reader')
const dir = 'somedir'
routerReader(dir, config => {
  config.resolve.alias.set('router', path.join(dir, 'src', 'router'))
}).then((res) => {
  console.log(res)
})
  • the first argument is dir of the program which to read

  • You should use the program's webpack config which make a influence to router,you can config this with chain webpack api in the second argument.webpack chain

Readme

Keywords

none

Package Sidebar

Install

npm i @which-route/vue-router-reader

Weekly Downloads

5

Version

0.1.6

License

MIT

Unpacked Size

5.61 kB

Total Files

10

Last publish

Collaborators

  • tangruijia