Skip to content
Permalink
Browse files

feat(build): remove deprecated `es/` build (#3604)

  • Loading branch information...
tmorehouse committed Aug 13, 2019
1 parent 1737072 commit 3828f59e4c640571ad86b4d4851d6ac31eaa9466
Showing with 395 additions and 639 deletions.
  1. +6 −6 docs/components/importdoc.vue
  2. +5 −26 scripts/build.sh
  3. +0 −1 src/bv-config.d.ts
  4. +1 −3 src/bv-config.js
  5. +0 −1 src/components/alert/index.d.ts
  6. +0 −2 src/components/alert/index.js
  7. +0 −1 src/components/badge/index.d.ts
  8. +0 −2 src/components/badge/index.js
  9. +0 −1 src/components/breadcrumb/index.d.ts
  10. +0 −2 src/components/breadcrumb/index.js
  11. +0 −1 src/components/button-group/index.d.ts
  12. +0 −2 src/components/button-group/index.js
  13. +0 −1 src/components/button-toolbar/index.d.ts
  14. +0 −2 src/components/button-toolbar/index.js
  15. +0 −1 src/components/button/index.d.ts
  16. +0 −2 src/components/button/index.js
  17. +0 −1 src/components/card/index.d.ts
  18. +0 −2 src/components/card/index.js
  19. +0 −1 src/components/carousel/index.d.ts
  20. +0 −2 src/components/carousel/index.js
  21. +0 −1 src/components/collapse/index.d.ts
  22. +0 −2 src/components/collapse/index.js
  23. +0 −1 src/components/dropdown/index.d.ts
  24. +0 −2 src/components/dropdown/index.js
  25. +0 −1 src/components/embed/index.d.ts
  26. +0 −2 src/components/embed/index.js
  27. +0 −1 src/components/form-checkbox/index.d.ts
  28. +0 −2 src/components/form-checkbox/index.js
  29. +0 −1 src/components/form-file/index.d.ts
  30. +0 −2 src/components/form-file/index.js
  31. +0 −1 src/components/form-group/index.d.ts
  32. +0 −2 src/components/form-group/index.js
  33. +0 −1 src/components/form-input/index.d.ts
  34. +0 −2 src/components/form-input/index.js
  35. +0 −1 src/components/form-radio/index.d.ts
  36. +0 −2 src/components/form-radio/index.js
  37. +0 −1 src/components/form-select/index.d.ts
  38. +0 −2 src/components/form-select/index.js
  39. +0 −1 src/components/form-textarea/index.d.ts
  40. +0 −2 src/components/form-textarea/index.js
  41. +0 −1 src/components/form/index.d.ts
  42. +0 −2 src/components/form/index.js
  43. +0 −1 src/components/image/index.d.ts
  44. +0 −2 src/components/image/index.js
  45. +2 −3 src/components/index.d.ts
  46. +0 −311 src/components/index.esm.js
  47. +84 −56 src/components/index.js
  48. +0 −1 src/components/input-group/index.d.ts
  49. +0 −2 src/components/input-group/index.js
  50. +0 −1 src/components/jumbotron/index.d.ts
  51. +0 −2 src/components/jumbotron/index.js
  52. +0 −1 src/components/layout/index.d.ts
  53. +0 −2 src/components/layout/index.js
  54. +0 −1 src/components/link/index.d.ts
  55. +0 −2 src/components/link/index.js
  56. +0 −1 src/components/list-group/index.d.ts
  57. +0 −2 src/components/list-group/index.js
  58. +0 −1 src/components/media/index.d.ts
  59. +0 −2 src/components/media/index.js
  60. +0 −2 src/components/modal/helpers/bv-modal.js
  61. +2 −2 src/components/modal/helpers/bv-modal.spec.js
  62. +0 −1 src/components/modal/index.d.ts
  63. +0 −2 src/components/modal/index.js
  64. +0 −1 src/components/nav/index.d.ts
  65. +0 −2 src/components/nav/index.js
  66. +0 −2 src/components/navbar/index.d.ts
  67. +0 −2 src/components/navbar/index.js
  68. +0 −1 src/components/pagination-nav/index.d.ts
  69. +0 −2 src/components/pagination-nav/index.js
  70. +0 −1 src/components/pagination/index.d.ts
  71. +0 −2 src/components/pagination/index.js
  72. +0 −1 src/components/popover/index.d.ts
  73. +0 −2 src/components/popover/index.js
  74. +0 −1 src/components/progress/index.d.ts
  75. +0 −2 src/components/progress/index.js
  76. +0 −1 src/components/spinner/index.d.ts
  77. +0 −2 src/components/spinner/index.js
  78. +0 −1 src/components/table/index.d.ts
  79. +0 −2 src/components/table/index.js
  80. +1 −0 src/components/table/table.js
  81. +0 −1 src/components/tabs/index.d.ts
  82. +0 −2 src/components/tabs/index.js
  83. +0 −3 src/components/toast/helpers/bv-toast.js
  84. +2 −2 src/components/toast/helpers/bv-toast.spec.js
  85. +0 −1 src/components/toast/index.d.ts
  86. +0 −2 src/components/toast/index.js
  87. +0 −1 src/components/tooltip/index.d.ts
  88. +0 −2 src/components/tooltip/index.js
  89. +2 −3 src/directives/index.d.ts
  90. +0 −43 src/directives/index.esm.js
  91. +16 −19 src/directives/index.js
  92. +0 −1 src/directives/modal/index.d.ts
  93. +0 −2 src/directives/modal/index.js
  94. +0 −1 src/directives/popover/index.d.ts
  95. +0 −2 src/directives/popover/index.js
  96. +0 −1 src/directives/scrollspy/index.d.ts
  97. +0 −2 src/directives/scrollspy/index.js
  98. +0 −1 src/directives/toggle/index.d.ts
  99. +0 −2 src/directives/toggle/index.js
  100. +0 −1 src/directives/tooltip/index.d.ts
  101. +0 −2 src/directives/tooltip/index.js
  102. +272 −11 src/index.js
  103. +0 −16 src/legacy-es.js
  104. +2 −2 src/utils/config.spec.js
@@ -125,14 +125,13 @@

<aside class="alert alert-warning my-4">
<p class="mb-0">
<b-badge variant="warning" tag="strong">Deprecation Warning as of v2.0.0-rc.22:</b-badge>
<b-badge variant="warning" tag="strong">CHANGED as of v2.0.0:</b-badge>
Importing components, directives and plugins from
<code class="notranslate" translate="no">bootstrap-vue/es/*</code>
has been deprecated. All components, directives and plugins are now available as top-level named
has been removed. All components, directives and plugins are now available as top-level named
exports in the <code class="notranslate" translate="no">ESM</code> and
<code class="notranslate" translate="no">CommonJS</code> builds. The
<code class="notranslate" translate="no">es/</code> directory build will be removed in a future
release.
<code class="notranslate" translate="no">es/</code> directory build has been removed.
</p>
</aside>
</section>
@@ -144,6 +143,8 @@ import kebabCase from 'lodash/kebabCase'
import startCase from 'lodash/startCase'
import AnchoredHeading from './anchored-heading'
const importPath = 'bootstrap-vue'
export default {
name: 'BDVImportdoc',
components: { AnchoredHeading },
@@ -212,9 +213,8 @@ export default {
},
directiveImportCode() {
const firstDirective = this.directives[0]
const firstDirectiveImport = this.directiveImports[0]
return [
`import { ${firstDirective} } from '${firstDirectiveImport.importPath}'`,
`import { ${firstDirective} } from '${importPath}'`,
"// Note: Vue automatically prefixes the directive name with 'v-'",
`Vue.directive('${this.directiveName(firstDirective)}', ${firstDirective})`
].join('\n')
@@ -13,28 +13,20 @@ echo 'Done.'
echo ''

# Cleanup
rm -rf dist es esm
rm -rf dist esm

echo 'Compile JS...'
rollup -c scripts/rollup.config.js
echo 'Done.'
echo ''

echo 'Build ESM modules...'
echo 'Compiling ESM modular build...'
NODE_ENV=esm babel src --out-dir esm --ignore 'src/**/*.spec.js'
rm -f esm/legacy-es.js esm/browser.js
rm -f esm/browser.js
echo "${BV_BANNER}" | cat - esm/index.js > esm/tmp.js && mv -f esm/tmp.js esm/index.js
echo 'Done.'
echo ''

echo 'Build ES modules (deprecated)...'
NODE_ENV=es babel src --out-dir es --ignore 'src/**/*.spec.js'
rm -f es/index.js es/browser.js
echo "${BV_BANNER}" | cat - es/legacy-es.js > es/index.js
rm -f es/legacy-es.js
echo 'Done.'
echo ''

echo 'Minify JS...'
terser dist/bootstrap-vue.js \
--compress typeofs=false \
@@ -78,29 +70,16 @@ echo 'Done.'
echo ''

echo 'Copying types from src/ to esm/ ...'
# There must be a better way to do this
# This may no longer be needed, as all exports are at top level now.
#
# The following does not preserve the paths
# shopt -s globstar
# cp src/**/*.d.ts es
#
# So we resort to a find with exec
cd src
find . -type f -name '*.d.ts' -exec cp {} ../esm/{} ';'
cd ..
echo 'Done.'
echo ''

echo 'Copying types from src/ to es/ ...'
# There must be a better way to do this
#
# The following does not preserve the paths
# shopt -s globstar
# cp src/**/*.d.ts es
#
# So we resort to a find with exec
cd src
find . -type f -name '*.d.ts' -exec cp {} ../es/{} ';'
find . -type f -name '*.d.ts' -exec cp {} ../esm/{} ';'
cd ..
echo 'Done.'
echo ''
@@ -2,4 +2,3 @@ import Vue, { PluginFunction, PluginObject } from 'vue'
import { BvPlugin } from './'

export declare const BVConfigPlugin: BvPlugin
export default BVConfigPlugin
@@ -3,6 +3,4 @@
//
import { pluginFactory } from './utils/plugins'

const BVConfigPlugin = /*#__PURE__*/ pluginFactory()

export default BVConfigPlugin
export const BVConfigPlugin = /*#__PURE__*/ pluginFactory()
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const AlertPlugin: BvPlugin
export default AlertPlugin

// Component: b-alert
export declare class BAlert extends BvComponent {
@@ -6,5 +6,3 @@ const AlertPlugin = /*#__PURE__*/ pluginFactory({
})

export { AlertPlugin, BAlert }

export default AlertPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const BadgePlugin: BvPlugin
export default BadgePlugin

// Component: b-badge
export declare class BBadge extends BvComponent {}
@@ -6,5 +6,3 @@ const BadgePlugin = /*#__PURE__*/ pluginFactory({
})

export { BadgePlugin, BBadge }

export default BadgePlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const BreadcrumbPlugin: BvPlugin
export default BreadcrumbPlugin

// Component: b-breadcrumb
export declare class BBreadcrumb extends BvComponent {}
@@ -8,5 +8,3 @@ const BreadcrumbPlugin = /*#__PURE__*/ pluginFactory({
})

export { BreadcrumbPlugin, BBreadcrumb, BBreadcrumbItem, BBreadcrumbLink }

export default BreadcrumbPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const ButtonGroupPlugin: BvPlugin
export default ButtonGroupPlugin

// Component: b-button-group
export declare class BButtonGroup extends BvComponent {}
@@ -9,5 +9,3 @@ const ButtonGroupPlugin = /*#__PURE__*/ pluginFactory({
})

export { ButtonGroupPlugin, BButtonGroup }

export default ButtonGroupPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const ButtonToolbarPlugin: BvPlugin
export default ButtonToolbarPlugin

// Component: b-button-toolbar
export declare class BButtonToolbar extends BvComponent {}
@@ -9,5 +9,3 @@ const ButtonToolbarPlugin = /*#__PURE__*/ pluginFactory({
})

export { ButtonToolbarPlugin, BButtonToolbar }

export default ButtonToolbarPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const ButtonPlugin: BvPlugin
export default ButtonPlugin

// Component: b-button
export declare class BButton extends BvComponent {}
@@ -12,5 +12,3 @@ const ButtonPlugin = /*#__PURE__*/ pluginFactory({
})

export { ButtonPlugin, BButton, BButtonClose }

export default ButtonPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const CardPlugin: BvPlugin
export default CardPlugin

// Component: b-card
export declare class BCard extends BvComponent {}
@@ -38,5 +38,3 @@ export {
BCardText,
BCardGroup
}

export default CardPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const CarouselPlugin: BvPlugin
export default CarouselPlugin

// Component: b-carousel
export declare class BCarousel extends BvComponent {
@@ -10,5 +10,3 @@ const CarouselPlugin = /*#__PURE*/ pluginFactory({
})

export { CarouselPlugin, BCarousel, BCarouselSlide }

export default CarouselPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const CollapsePlugin: BvPlugin
export default CollapsePlugin

// Component: b-collapse
export declare class BCollapse extends BvComponent {
@@ -8,5 +8,3 @@ const CollapsePlugin = /*#__PURE__*/ pluginFactory({
})

export { CollapsePlugin, BCollapse }

export default CollapsePlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const DropdownPlugin: BvPlugin
export default DropdownPlugin

// Component: b-dropdown
export declare class BDropdown extends BvComponent {
@@ -42,5 +42,3 @@ export {
BDropdownText,
BDropdownGroup
}

export default DropdownPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const EmbedPlugin: BvPlugin
export default EmbedPlugin

// Component: b-embed
export declare class BEmbed extends BvComponent {}
@@ -6,5 +6,3 @@ const EmbedPlugin = /*#__PURE__*/ pluginFactory({
})

export { EmbedPlugin, BEmbed }

export default EmbedPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const FormCheckboxPlugin: BvPlugin
export default FormCheckboxPlugin

// Component: b-form-checkbox
export declare class BFormCheckbox extends BvComponent {}
@@ -14,5 +14,3 @@ const FormCheckboxPlugin = /*#__PURE__*/ pluginFactory({
})

export { FormCheckboxPlugin, BFormCheckbox, BFormCheckboxGroup }

export default FormCheckboxPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const FormFilePlugin: BvPlugin
export default FormFilePlugin

// Component: b-form-file
export declare class BFormFile extends BvComponent {
@@ -9,5 +9,3 @@ const FormFilePlugin = /*#__PURE__*/ pluginFactory({
})

export { FormFilePlugin, BFormFile }

export default FormFilePlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const FormGroupPlugin: BvPlugin
export default FormGroupPlugin

// Component: b-form-group
export declare class BFormGroup extends BvComponent {}
@@ -9,5 +9,3 @@ const FormGroupPlugin = /*#__PURE__*/ pluginFactory({
})

export { FormGroupPlugin, BFormGroup }

export default FormGroupPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const FormInputPlugin: BvPlugin
export default FormInputPlugin

// Component: b-form-input
export declare class BFormInput extends BvComponent {
@@ -9,5 +9,3 @@ const FormInputPlugin = /*#__PURE__*/ pluginFactory({
})

export { FormInputPlugin, BFormInput }

export default FormInputPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const FormRadioPlugin: BvPlugin
export default FormRadioPlugin

// Component: b-form-radio
export declare class BFormRadio extends BvComponent {}
@@ -12,5 +12,3 @@ const FormRadioPlugin = /*#__PURE__*/ pluginFactory({
})

export { FormRadioPlugin, BFormRadio, BFormRadioGroup }

export default FormRadioPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const FormSelectPlugin: BvPlugin
export default FormSelectPlugin

// Component: b-form-select
export declare class BFormSelect extends BvComponent {}
@@ -9,5 +9,3 @@ const FormSelectPlugin = /*#__PURE__*/ pluginFactory({
})

export { FormSelectPlugin, BFormSelect }

export default FormSelectPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const FormTextareaPlugin: BvPlugin
export default FormTextareaPlugin

// Component: b-form-textarea
export declare class BFormTextarea extends BvComponent {
@@ -9,5 +9,3 @@ const FormTextareaPlugin = /*#__PURE__*/ pluginFactory({
})

export { FormTextareaPlugin, BFormTextarea }

export default FormTextareaPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const FormPlugin: BvPlugin
export default FormPlugin

// Component: b-form
export declare class BForm extends BvComponent {}
@@ -22,5 +22,3 @@ const FormPlugin = /*#__PURE__*/ pluginFactory({

// BFormRow is not exported here as a named export, as it is exported by Layout
export { FormPlugin, BForm, BFormDatalist, BFormText, BFormInvalidFeedback, BFormValidFeedback }

export default FormPlugin
@@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../'

// Plugin
export declare const ImagePlugin: BvPlugin
export default ImagePlugin

// Component: b-img
export declare class BImg extends BvComponent {}
@@ -10,5 +10,3 @@ const ImagePlugin = /*#__PURE__*/ pluginFactory({
})

export { ImagePlugin, BImg, BImgLazy }

export default ImagePlugin

0 comments on commit 3828f59

Please sign in to comment.
You can’t perform that action at this time.