1.0.17 • Published 6 years ago

vue-components-index v1.0.17

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

what is this ?

this plugin will search all vue components in <vue-cli-project-root>/src/components folder, and exports them via an automatically generated index file. format of the index file will looks like below: example

usage

since now on, you can import vue components without necessary to specify their paths. for example:

import {exampleComponent} from '@/components'

namesake conflicts

This plugin yet can not handle namesake conflicts, so if there has same name components in your project, you should not import them via the index file that generated by this plugin. Otherwise it will lead to unexpected bugs. as a fallback solution, you have to import namesake components via specify their respective paths.

install

1.download

npm i --save-dev vue-components-index

2.configure vue.config.js

note: if there has no vue.config.js file in your project root, you need to create one at first.

const VueComponentsIndex = require('vue-components-index')

module.exports = {
  configureWebpack: {
    plugins: [new VueComponentsIndex()]
  }
}

newer version available !

the newer version of this plugin is renamed to resource-inverted-index-generator, which could generate inverted index for any type of files, not only vue.

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago