Try to get Vue.use() to work with components
				
					
				
			but really, test the release again, b/c it's not working yet...
This commit is contained in:
		
							parent
							
								
									c7dbfd0f7a
								
							
						
					
					
						commit
						62981b8e90
					
				
					 5 changed files with 118 additions and 10 deletions
				
			
		
							
								
								
									
										16
									
								
								package.json
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								package.json
									
										
									
									
									
								
							| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    "name": "byjove",
 | 
					    "name": "byjove",
 | 
				
			||||||
    "version": "0.1.0",
 | 
					    "version": "0.1.0",
 | 
				
			||||||
    "description": "Generic app components for Vue.js frontend to Tailbone API backend",
 | 
					    "description": "Generic-ish app components for Vue.js frontend to Tailbone API backend",
 | 
				
			||||||
    "keywords": [
 | 
					    "keywords": [
 | 
				
			||||||
        "rattail",
 | 
					        "rattail",
 | 
				
			||||||
        "tailbone"
 | 
					        "tailbone"
 | 
				
			||||||
| 
						 | 
					@ -17,14 +17,18 @@
 | 
				
			||||||
        "build": "vue-cli-service build --target lib --name byjove src/index.js"
 | 
					        "build": "vue-cli-service build --target lib --name byjove src/index.js"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "dependencies": {
 | 
					    "dependencies": {
 | 
				
			||||||
        "vue": "^2.6.10",
 | 
					        "vue": "^2.6.10"
 | 
				
			||||||
        "vue-resource": "^1.5.1",
 | 
					 | 
				
			||||||
        "vue-router": "^3.1.3",
 | 
					 | 
				
			||||||
        "vuex": "^3.1.1"
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "devDependencies": {
 | 
					    "devDependencies": {
 | 
				
			||||||
        "@vue/cli-service": "^3.0.5",
 | 
					        "@vue/cli-service": "^3.0.5",
 | 
				
			||||||
        "vue-template-compiler": "^2.6.10"
 | 
					        "rollup": "^1.26.3",
 | 
				
			||||||
 | 
					        "rollup-plugin-buble": "^0.19.8",
 | 
				
			||||||
 | 
					        "rollup-plugin-commonjs": "^10.1.0",
 | 
				
			||||||
 | 
					        "rollup-plugin-vue": "^5.1.2",
 | 
				
			||||||
 | 
					        "vue-resource": "^1.5.1",
 | 
				
			||||||
 | 
					        "vue-router": "^3.1.3",
 | 
				
			||||||
 | 
					        "vue-template-compiler": "^2.6.10",
 | 
				
			||||||
 | 
					        "vuex": "^3.1.1"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "main": "./dist/byjove.umd.js"
 | 
					    "main": "./dist/byjove.umd.js"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,28 @@
 | 
				
			||||||
import ByjoveApp from './ByjoveApp'
 | 
					// Import vue component
 | 
				
			||||||
 | 
					import ByjoveApp from './ByjoveApp.vue'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Declare install function executed by Vue.use()
 | 
				
			||||||
 | 
					export function install(Vue) {
 | 
				
			||||||
 | 
					    if (install.installed) return;
 | 
				
			||||||
 | 
					    install.installed = true;
 | 
				
			||||||
 | 
					    Vue.component('ByjoveApp', ByjoveApp);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create module definition for Vue.use()
 | 
				
			||||||
 | 
					const plugin = {
 | 
				
			||||||
 | 
					    install,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Auto-install when vue is found (eg. in browser via <script> tag)
 | 
				
			||||||
 | 
					let GlobalVue = null;
 | 
				
			||||||
 | 
					if (typeof window !== 'undefined') {
 | 
				
			||||||
 | 
					    GlobalVue = window.Vue;
 | 
				
			||||||
 | 
					} else if (typeof global !== 'undefined') {
 | 
				
			||||||
 | 
					    GlobalVue = global.Vue;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					if (GlobalVue) {
 | 
				
			||||||
 | 
					    GlobalVue.use(plugin);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// To allow use as module (npm/webpack/etc.) export component
 | 
				
			||||||
export default ByjoveApp
 | 
					export default ByjoveApp
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,32 @@
 | 
				
			||||||
import ByjoveFeedback from './ByjoveFeedback'
 | 
					// import ByjoveFeedback from './ByjoveFeedback'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Import vue component
 | 
				
			||||||
 | 
					// import component from './ByjoveFeedback';
 | 
				
			||||||
 | 
					import ByjoveFeedback from './ByjoveFeedback.vue'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Declare install function executed by Vue.use()
 | 
				
			||||||
 | 
					export function install(Vue) {
 | 
				
			||||||
 | 
					    if (install.installed) return;
 | 
				
			||||||
 | 
					    install.installed = true;
 | 
				
			||||||
 | 
					    Vue.component('ByjoveFeedback', ByjoveFeedback);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create module definition for Vue.use()
 | 
				
			||||||
 | 
					const plugin = {
 | 
				
			||||||
 | 
					    install,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Auto-install when vue is found (eg. in browser via <script> tag)
 | 
				
			||||||
 | 
					let GlobalVue = null;
 | 
				
			||||||
 | 
					if (typeof window !== 'undefined') {
 | 
				
			||||||
 | 
					    GlobalVue = window.Vue;
 | 
				
			||||||
 | 
					} else if (typeof global !== 'undefined') {
 | 
				
			||||||
 | 
					    GlobalVue = global.Vue;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					if (GlobalVue) {
 | 
				
			||||||
 | 
					    GlobalVue.use(plugin);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// To allow use as module (npm/webpack/etc.) export component
 | 
				
			||||||
 | 
					// export default component;
 | 
				
			||||||
export default ByjoveFeedback
 | 
					export default ByjoveFeedback
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,28 @@
 | 
				
			||||||
import ByjoveLogo from './ByjoveLogo'
 | 
					// Import vue component
 | 
				
			||||||
 | 
					import ByjoveLogo from './ByjoveLogo.vue'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Declare install function executed by Vue.use()
 | 
				
			||||||
 | 
					export function install(Vue) {
 | 
				
			||||||
 | 
					    if (install.installed) return;
 | 
				
			||||||
 | 
					    install.installed = true;
 | 
				
			||||||
 | 
					    Vue.component('ByjoveLogo', ByjoveLogo);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create module definition for Vue.use()
 | 
				
			||||||
 | 
					const plugin = {
 | 
				
			||||||
 | 
					    install,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Auto-install when vue is found (eg. in browser via <script> tag)
 | 
				
			||||||
 | 
					let GlobalVue = null;
 | 
				
			||||||
 | 
					if (typeof window !== 'undefined') {
 | 
				
			||||||
 | 
					    GlobalVue = window.Vue;
 | 
				
			||||||
 | 
					} else if (typeof global !== 'undefined') {
 | 
				
			||||||
 | 
					    GlobalVue = global.Vue;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					if (GlobalVue) {
 | 
				
			||||||
 | 
					    GlobalVue.use(plugin);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// To allow use as module (npm/webpack/etc.) export component
 | 
				
			||||||
export default ByjoveLogo
 | 
					export default ByjoveLogo
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,28 @@
 | 
				
			||||||
import ByjoveMenu from './ByjoveMenu'
 | 
					// Import vue component
 | 
				
			||||||
 | 
					import ByjoveMenu from './ByjoveMenu.vue'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Declare install function executed by Vue.use()
 | 
				
			||||||
 | 
					export function install(Vue) {
 | 
				
			||||||
 | 
					    if (install.installed) return;
 | 
				
			||||||
 | 
					    install.installed = true;
 | 
				
			||||||
 | 
					    Vue.component('ByjoveMenu', ByjoveMenu);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create module definition for Vue.use()
 | 
				
			||||||
 | 
					const plugin = {
 | 
				
			||||||
 | 
					    install,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Auto-install when vue is found (eg. in browser via <script> tag)
 | 
				
			||||||
 | 
					let GlobalVue = null;
 | 
				
			||||||
 | 
					if (typeof window !== 'undefined') {
 | 
				
			||||||
 | 
					    GlobalVue = window.Vue;
 | 
				
			||||||
 | 
					} else if (typeof global !== 'undefined') {
 | 
				
			||||||
 | 
					    GlobalVue = global.Vue;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					if (GlobalVue) {
 | 
				
			||||||
 | 
					    GlobalVue.use(plugin);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// To allow use as module (npm/webpack/etc.) export component
 | 
				
			||||||
export default ByjoveMenu
 | 
					export default ByjoveMenu
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue