diff --git a/README.md b/README.md index bb62c76..0213723 100644 --- a/README.md +++ b/README.md @@ -18,21 +18,10 @@ ## Usage -### With [vue-loader](https://github.com/vuejs/vue-loader) or [vueify](https://github.com/vuejs/vueify) - ```js -import IcFormly from 'ic-formly.vue'; +import IcFormly from 'ic-formly'; -Vue.component('ic-formly', IcFormly); -``` - -### ES6 Modules / CommonJS - -```js -import IcFormly from 'ic-formly/cjs/ic-formly.min.js'; -import 'ic-formly/cjs/ic-formly.min.css'; - -Vue.component('ic-formly', IcFormly); +Vue.use(IcFormly); ``` ### UMD @@ -42,11 +31,6 @@ Vue.component('ic-formly', IcFormly); - - - ``` ## Build diff --git a/boot_doc.js b/boot_doc.js new file mode 100644 index 0000000..5435605 --- /dev/null +++ b/boot_doc.js @@ -0,0 +1,4 @@ +import Vue from 'vue' +import IcFormly from './src' + +Vue.use(IcFormly) diff --git a/poi.config.js b/poi.config.js index cd8a21c..01e2938 100644 --- a/poi.config.js +++ b/poi.config.js @@ -4,7 +4,7 @@ const glob = require('glob').sync; const {name} = require('./package.json'); module.exports = { - entry: glob('./src/**/*.vue'), + entry: glob('./src'), filename: { js: name + '.min.js', css: name + '.min.css', diff --git a/src/ic-formly/ic-formly.vue b/src/ic-formly/ic-formly.vue index 4f32ece..6f7e06e 100644 --- a/src/ic-formly/ic-formly.vue +++ b/src/ic-formly/ic-formly.vue @@ -18,14 +18,8 @@