From f7a1a2ae8942105d5bcdea66bdbf1e6c6d72ca43 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:12:42 -0300 Subject: [PATCH 01/25] Update package.json --- src/components/navbar/package.json | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/navbar/package.json b/src/components/navbar/package.json index 5d652ecff65..c4526a69f9c 100644 --- a/src/components/navbar/package.json +++ b/src/components/navbar/package.json @@ -4,14 +4,7 @@ "meta": { "title": "Navbar", "components": [ - { - "component": "BNavbar", - "plugins": [ - "Nav", - "Dropdown", - "Collapse" - ] - }, + "BNavbar", "BNavbarNav", "BNavbarBrand", { @@ -32,6 +25,11 @@ } ] } + ], + "plugins": [ + "Nav", + "Dropdown", + "Collapse" ] } } From 91d04fe7521ff5247797abceec8ce0e1db3f5138 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:23:33 -0300 Subject: [PATCH 02/25] Update package.json --- src/components/nav/package.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/nav/package.json b/src/components/nav/package.json index b6a7e13b4e6..ef482a3b04b 100644 --- a/src/components/nav/package.json +++ b/src/components/nav/package.json @@ -4,12 +4,7 @@ "meta": { "title": "Nav", "components": [ - { - "component": "BNav", - "plugins": [ - "Dropdown" - ] - }, + "BNav", "BNavItem", "BNavText", "BNavForm", @@ -61,6 +56,9 @@ } ] } + ], + "plugins": [ + "Dropdown" ] } } From 40871a3b1d8b97cf7b8d6a9bef05fded6dc80b63 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:24:31 -0300 Subject: [PATCH 03/25] Update package.json --- src/components/collapse/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/collapse/package.json b/src/components/collapse/package.json index 832587a5589..7d16d450f89 100644 --- a/src/components/collapse/package.json +++ b/src/components/collapse/package.json @@ -6,9 +6,6 @@ "components": [ { "component": "BCollapse", - "directives": [ - "vBToggle" - ], "events": [ { "event": "show", @@ -54,6 +51,9 @@ } ] } - ] + ], + "directives": [ + "vBToggle" + ], } } From 6f72bf23b6fb5669a82228f844644428304e6518 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:26:06 -0300 Subject: [PATCH 04/25] Update package.json --- src/components/modal/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/modal/package.json b/src/components/modal/package.json index 27e3048a58e..9fc7ace63f6 100644 --- a/src/components/modal/package.json +++ b/src/components/modal/package.json @@ -6,9 +6,6 @@ "components": [ { "component": "BModal", - "directives": [ - "vBModal" - ], "events": [ { "event": "change", @@ -208,6 +205,9 @@ } ] } + ], + "directives": [ + "vBModal" ] } } From 38391ddc6439d51f22a0a81a3bcd783de6ab103d Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:26:34 -0300 Subject: [PATCH 05/25] Update package.json --- src/components/collapse/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/collapse/package.json b/src/components/collapse/package.json index 7d16d450f89..023e44c00ed 100644 --- a/src/components/collapse/package.json +++ b/src/components/collapse/package.json @@ -54,6 +54,6 @@ ], "directives": [ "vBToggle" - ], + ] } } From 1e4f45135eaf35d994ded806966115e0c80ec498 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:28:40 -0300 Subject: [PATCH 06/25] Update package.json --- src/components/popover/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/popover/package.json b/src/components/popover/package.json index 97ab36f7285..303c81e642f 100644 --- a/src/components/popover/package.json +++ b/src/components/popover/package.json @@ -6,9 +6,6 @@ "components": [ { "component": "BPopover", - "directives": [ - "vBPopover" - ], "events": [ { "event": "show", @@ -168,6 +165,9 @@ } ] } + ], + "directives": [ + "vBPopover" ] } } From 271773bc52a9a352722c5a406527a7c3feef5f41 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:29:32 -0300 Subject: [PATCH 07/25] Update package.json --- src/components/tooltip/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/tooltip/package.json b/src/components/tooltip/package.json index b08958f0c15..c5087f1afd1 100644 --- a/src/components/tooltip/package.json +++ b/src/components/tooltip/package.json @@ -6,9 +6,6 @@ "components": [ { "component": "BTooltip", - "directives": [ - "vBTooltip" - ], "events": [ { "event": "show", @@ -162,6 +159,9 @@ } ] } + ], + "directives": [ + "vBTooltip" ] } } From e8f1f5ba304a9670c3d2db95b86e04d325c65264 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:38:02 -0300 Subject: [PATCH 08/25] Update package.json --- src/components/tooltip/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/tooltip/package.json b/src/components/tooltip/package.json index aa85a4644e6..087b4a61c0a 100644 --- a/src/components/tooltip/package.json +++ b/src/components/tooltip/package.json @@ -4,6 +4,9 @@ "meta": { "title": "Tooltip", "description": "Easily add tooltips to elements or components via the component or v-b-tooltip directive.", + "directives": [ + "vBTooltip" + ], "components": [ { "component": "BTooltip", @@ -160,9 +163,6 @@ } ] } - ], - "directives": [ - "vBTooltip" ] } } From 257b820479a66435d788842a328bbb81e5fc7227 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:38:35 -0300 Subject: [PATCH 09/25] Update package.json --- src/components/popover/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/popover/package.json b/src/components/popover/package.json index ab649ccbda3..9016f13a4dd 100644 --- a/src/components/popover/package.json +++ b/src/components/popover/package.json @@ -4,6 +4,9 @@ "meta": { "title": "Popover", "description": "The Popover feature provides a tooltip-like behavior, can be easily applied to any interactive element via the component or v-b-popover directive", + "directives": [ + "vBPopover" + ], "components": [ { "component": "BPopover", @@ -166,9 +169,6 @@ } ] } - ], - "directives": [ - "vBPopover" ] } } From 8d02e2596da07fef2e2146d687c5ece023e767db Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:39:15 -0300 Subject: [PATCH 10/25] Update package.json --- src/components/navbar/package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/navbar/package.json b/src/components/navbar/package.json index c090893ce7d..b4a4c064cdb 100644 --- a/src/components/navbar/package.json +++ b/src/components/navbar/package.json @@ -4,6 +4,11 @@ "meta": { "title": "Navbar", "description": "The component is a responsive wrapper that positions branding, navigation, and other elements into a concise header. It’s easily extensible and thanks to the component.", + "plugins": [ + "Nav", + "Dropdown", + "Collapse" + ], "components": [ "BNavbar", "BNavbarNav", @@ -26,11 +31,6 @@ } ] } - ], - "plugins": [ - "Nav", - "Dropdown", - "Collapse" ] } } From d1f7bae44519cba70e186af3fa752daa790b98a6 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:39:49 -0300 Subject: [PATCH 11/25] Update package.json --- src/components/nav/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/nav/package.json b/src/components/nav/package.json index 009cfb8d3c0..8701e03b218 100644 --- a/src/components/nav/package.json +++ b/src/components/nav/package.json @@ -4,6 +4,9 @@ "meta": { "title": "Nav", "description": "Navigation components that share general markup and styles, from the base class to the active and disabled states. Swap modifier props to switch between each style.", + "plugins": [ + "Dropdown" + ], "components": [ "BNav", "BNavItem", @@ -57,9 +60,6 @@ } ] } - ], - "plugins": [ - "Dropdown" ] } } From c874ae95b60c6d3f30e519f7b946043a0bde4b21 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:40:24 -0300 Subject: [PATCH 12/25] Update package.json --- src/components/modal/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/modal/package.json b/src/components/modal/package.json index c5c28113dd9..204bbf2a88e 100644 --- a/src/components/modal/package.json +++ b/src/components/modal/package.json @@ -4,6 +4,9 @@ "meta": { "title": "Modal", "description": "Modals are streamlined, but flexible dialog prompts powered by JavaScript and CSS. They support a number of use cases from user notification to completely custom content and feature a handful of helpful sub-components, sizes, variants, accessibility, and more.", + "directives": [ + "vBModal" + ], "components": [ { "component": "BModal", @@ -206,9 +209,6 @@ } ] } - ], - "directives": [ - "vBModal" ] } } From 6a02951849bb1413217250cbdfd2c0b9d94a53f4 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:41:06 -0300 Subject: [PATCH 13/25] Update package.json --- src/components/collapse/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/collapse/package.json b/src/components/collapse/package.json index 2927d120fb6..6df247a9f5f 100644 --- a/src/components/collapse/package.json +++ b/src/components/collapse/package.json @@ -4,6 +4,9 @@ "meta": { "title": "Collapse", "description": "Easily toggle content visibility on your pages. Includes support for making accordions.", + "directives": [ + "vBToggle" + ], "components": [ { "component": "BCollapse", @@ -52,9 +55,6 @@ } ] } - ], - "directives": [ - "vBToggle" ] } } From 1e4d2c010a63ad7bed502cbc8420dcda2931ab20 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:44:49 -0300 Subject: [PATCH 14/25] Update index.js --- src/components/collapse/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/collapse/index.js b/src/components/collapse/index.js index e8df927da37..f6598fb5bd4 100644 --- a/src/components/collapse/index.js +++ b/src/components/collapse/index.js @@ -1,15 +1,15 @@ import BCollapse from './collapse' -import BToggleDirectivePlugin from '../../directives/toggle' +import BToggleDirective from '../../directives/toggle/toggle' import { installFactory } from '../../utils/plugins' const components = { BCollapse } -const plugins = { - BToggleDirectivePlugin +const directives = { + BToggleDirective } export default { - install: installFactory({ components, plugins }) + install: installFactory({ components, directives }) } From e588fd58ed6cb185283d18a72fc1de30b862928e Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:48:11 -0300 Subject: [PATCH 15/25] Update index.js --- src/components/modal/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/modal/index.js b/src/components/modal/index.js index 5a20ae39feb..bd612c36e0d 100644 --- a/src/components/modal/index.js +++ b/src/components/modal/index.js @@ -1,15 +1,15 @@ import BModal from './modal' -import BModalDirectivePlugin from '../../directives/modal' +import BModalDirective from '../../directives/modal/modal' import { installFactory } from '../../utils/plugins' const components = { BModal } -const plugins = { - BModalDirectivePlugin +const directives = { + BModal: BModalDirective } export default { - install: installFactory({ components, plugins }) + install: installFactory({ components, directives }) } From 64b634d2d8d18d5fb75a755281aa80c1aa01c2f6 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:48:47 -0300 Subject: [PATCH 16/25] Update index.js --- src/components/collapse/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/collapse/index.js b/src/components/collapse/index.js index f6598fb5bd4..01e606f0f06 100644 --- a/src/components/collapse/index.js +++ b/src/components/collapse/index.js @@ -7,7 +7,7 @@ const components = { } const directives = { - BToggleDirective + BToggle: BToggleDirective } export default { From 570fded28b8b663f79b06796c9427adbaa1361a4 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:50:35 -0300 Subject: [PATCH 17/25] Update index.js --- src/components/tooltip/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/tooltip/index.js b/src/components/tooltip/index.js index 480079637b9..c04ab4a13c5 100644 --- a/src/components/tooltip/index.js +++ b/src/components/tooltip/index.js @@ -1,15 +1,15 @@ import BTooltip from './tooltip' -import BTooltipDirectivePlugin from '../../directives/tooltip' +import BTooltipDirective from '../../directives/tooltip/tooltip' import { installFactory } from '../../utils/plugins' const components = { BTooltip } -const plugins = { - BTooltipDirectivePlugin +const directives = { + BTooltip: BTooltipDirective } export default { - install: installFactory({ components, plugins }) + install: installFactory({ components, directives }) } From b99ea18c3c2d4134e06d5f9aa9307d92f8ea61c1 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 13:51:34 -0300 Subject: [PATCH 18/25] Update index.js --- src/components/popover/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/popover/index.js b/src/components/popover/index.js index 47b94a5b848..8758cf19e99 100644 --- a/src/components/popover/index.js +++ b/src/components/popover/index.js @@ -1,15 +1,15 @@ import BPopover from './popover' -import BPopoverDirectivePlugin from '../../directives/popover' +import BPopoverDirective from '../../directives/popover/popover' import { installFactory } from '../../utils/plugins' const components = { BPopover } -const plugins = { - BPopoverDirectivePlugin +const directives = { + BPopover: BPopoverDirective } export default { - install: installFactory({ components, plugins }) + install: installFactory({ components, directives }) } From bcffc43d16dfeeb2a7fa159b65d8f06bad0d873b Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 14:08:43 -0300 Subject: [PATCH 19/25] Update index.js --- src/index.js | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/index.js b/src/index.js index 14a9d6c4ce1..656378f99e1 100644 --- a/src/index.js +++ b/src/index.js @@ -3,20 +3,25 @@ import * as directivePlugins from './directives' import { registerPlugins, vueUse } from './utils/plugins' import { setConfig } from './utils/config' -const BootstrapVue = { - install(Vue, config = {}) { - // Configure BootstrapVue - setConfig(config) +const install = (Vue, config = {}) => { + if (install.installed) { + return + } + install.installed = true - // Register component plugins - registerPlugins(Vue, componentPlugins) + // Configure BootstrapVue + setConfig(config) - // Register directive plugins - registerPlugins(Vue, directivePlugins) - }, - setConfig(config = {}) /* istanbul ignore next */ { - setConfig(config) - } + // Register component plugins + registerPlugins(Vue, componentPlugins) + + // Register directive plugins + registerPlugins(Vue, directivePlugins) +} + +const BootstrapVue = { + install: install, + setConfig: setConfig } // Auto installation only occurs if window.Vue exists From 62f792c20a38da4393a9223d759df8a11b01aad9 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 14:11:45 -0300 Subject: [PATCH 20/25] Update index.js --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index 656378f99e1..e18f235cda1 100644 --- a/src/index.js +++ b/src/index.js @@ -5,6 +5,7 @@ import { setConfig } from './utils/config' const install = (Vue, config = {}) => { if (install.installed) { + /* istanbul ignore next */ return } install.installed = true From f2860e28080751cd479a834ff170f5f31c21e9f9 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 14:19:44 -0300 Subject: [PATCH 21/25] Update plugins.js --- src/utils/plugins.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/utils/plugins.js b/src/utils/plugins.js index f320ffcec7c..e0dfca05f3e 100644 --- a/src/utils/plugins.js +++ b/src/utils/plugins.js @@ -6,12 +6,20 @@ import { setConfig } from './config' * @returns {function} plugin install function */ export const installFactory = ({ components, directives, plugins }) => { - return (Vue, config = {}) => { + const install = (Vue, config = {}) => { + if (install.installed) { + /* instabul ignore next */ + return + } + install.installed = true setConfig(config) registerComponents(Vue, components) registerDirectives(Vue, directives) registerPlugins(Vue, plugins) } + install.installed = false + + return install } /** From 7a0844cd898cfea53100eff9f06c201c2e020990 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 14:21:33 -0300 Subject: [PATCH 22/25] Update index.js --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index e18f235cda1..ebc8c8c06cc 100644 --- a/src/index.js +++ b/src/index.js @@ -20,6 +20,8 @@ const install = (Vue, config = {}) => { registerPlugins(Vue, directivePlugins) } +install.installed = false + const BootstrapVue = { install: install, setConfig: setConfig From f6992be424cf70bc659f4336f6bd07005e634a6d Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 14:24:56 -0300 Subject: [PATCH 23/25] Update plugins.js --- src/utils/plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/plugins.js b/src/utils/plugins.js index e0dfca05f3e..49d6961c356 100644 --- a/src/utils/plugins.js +++ b/src/utils/plugins.js @@ -8,7 +8,7 @@ import { setConfig } from './config' export const installFactory = ({ components, directives, plugins }) => { const install = (Vue, config = {}) => { if (install.installed) { - /* instabul ignore next */ + /* istanbul ignore next */ return } install.installed = true From d2cf4a58e8d9405d4188751d98ce3de5c5fc7c73 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 15:12:57 -0300 Subject: [PATCH 24/25] Update importdoc.vue --- docs/components/importdoc.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/importdoc.vue b/docs/components/importdoc.vue index ec4484af551..d9dfee3f5f0 100644 --- a/docs/components/importdoc.vue +++ b/docs/components/importdoc.vue @@ -144,7 +144,7 @@ export default { const firstDirective = this.directives[0] const firstDirectiveImport = this.directiveImports[0] return [ - "// Note: Vue automatically prefixes the directive name with 'v-'", + "// Note: Vue automatically prefixes the directive name with 'v-'", `import ${firstDirective} from '${firstDirectiveImport.importPath}'`, `Vue.directive('${this.directiveName(firstDirective)}', ${firstDirective})` ].join('\n') From 099462fd93494da4c8fa2befbd01a5967e631505 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sun, 31 Mar 2019 15:54:58 -0300 Subject: [PATCH 25/25] Update importdoc.vue --- docs/components/importdoc.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/importdoc.vue b/docs/components/importdoc.vue index d9dfee3f5f0..a635fa55daf 100644 --- a/docs/components/importdoc.vue +++ b/docs/components/importdoc.vue @@ -183,7 +183,7 @@ export default { return kebabCase(directive).replace(/^v-/, '') }, directiveAttr(directive) { - return this.directiveName(directive) + return kebabCase(directive) }, directivePath(directive) { const directiveName = this.directiveName(directive).replace(/^b-/, '')