This repository was archived by the owner on Jun 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +39
-18
lines changed Expand file tree Collapse file tree 7 files changed +39
-18
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ import {
54
54
maxLength ,
55
55
url ,
56
56
/* } from '../dist/as-dynamic-forms.common'; */
57
- } from ' ../src/main ' ;
57
+ } from ' ../../ src/index ' ;
58
58
59
59
const data = () => ({
60
60
formData: {},
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import Vue from 'vue';
2
2
import App from './App.vue' ;
3
3
import './styles/main.scss' ;
4
4
5
- import VueDynamicForms from '../../src/main ' ; // Dev
5
+ import VueDynamicForms from '../../src/index ' ; // Dev
6
6
// import VueDynamicForms from '@asigloo/vue-dynamic-forms' // Prod
7
7
8
8
Vue . config . productionTip = false ;
Original file line number Diff line number Diff line change 6
6
$input-border-radius: 50px; */
7
7
// @import '../../src/styles/themes/default.scss';
8
8
9
- @import ' ../../src/styles/themes/material.scss' ;
9
+ @import ' ../../../ src/styles/themes/material.scss' ;
Original file line number Diff line number Diff line change 13
13
},
14
14
"scripts" : {
15
15
"serve" : " vue-cli-service serve" ,
16
- "build" : " vue-cli-service build --target lib --name as-dynamic-forms src/main .js" ,
16
+ "build" : " vue-cli-service build --target lib --name as-dynamic-forms src/index .js" ,
17
17
"lint" : " vue-cli-service lint" ,
18
18
"test" : " vue-cli-service test:unit --verbose --no-cache --watchAll" ,
19
19
"publish" : " npm run build && npm publish --access public" ,
Original file line number Diff line number Diff line change
1
+ import DynamicForm from './components/dynamic-form/DynamicForm.vue' ;
2
+ import DynamicInput from './components/dynamic-input/DynamicInput.vue' ;
3
+ export * from './core/utils' ;
4
+ const version = process . env . VERSION || require ( '../package.json' ) . version ;
5
+
6
+ export let _Vue ;
7
+
8
+ export function install ( Vue ) {
9
+ if ( install . installed && _Vue === Vue ) return ;
10
+ install . installed = true ;
11
+
12
+ _Vue = Vue ;
13
+
14
+ Vue . component ( 'dynamic-form' , DynamicForm ) ;
15
+ Vue . component ( 'dynamic-input' , DynamicInput ) ;
16
+ }
17
+
18
+ export const AsDynamicForms = {
19
+ install,
20
+ version,
21
+ } ;
22
+
23
+ // Automatic installation if Vue has been added to the global scope.
24
+ if ( typeof window !== 'undefined' && window . Vue ) {
25
+ window . Vue . use ( AsDynamicForms ) ;
26
+ }
27
+
28
+ export { DynamicForm , DynamicInput } ;
29
+
30
+ export default AsDynamicForms ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ module.exports = {
17
17
filename : 'index.html' ,
18
18
} ,
19
19
} ,
20
+ configureWebpack : {
21
+ output : {
22
+ libraryExport : 'default' ,
23
+ } ,
24
+ } ,
20
25
chainWebpack : config => {
21
26
config . optimization . splitChunks ( false ) ;
22
27
config . merge ( { devtool : 'source-map' } ) ;
You can’t perform that action at this time.
0 commit comments