Skip to content

Commit 90a2e98

Browse files
author
Magda
committed
Update dependencies
1 parent 7f8877f commit 90a2e98

File tree

4 files changed

+101
-7
lines changed

4 files changed

+101
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<h1 align="center">Vue Bootstrap with Material Design</h1>
99

1010
<p align="center">
11-
Based on the latest <b>Bootstrap 4</b> and Vue <b>2.6.10</b>.
11+
Based on the latest <b>Bootstrap 4</b> and Vue <b>2.6.11</b>.
1212
</p>
1313
<p align="center">
1414
<b>400+</b> material UI elements, <b>600+</b> material icons, <b>74</b> CSS animations, SASS files, templates, tutorials and many more. <b>Free for personal and commercial use.</b>
@@ -59,7 +59,7 @@ __________
5959
# Version
6060

6161
- MDBVue 6.3.0
62-
- Vue 2.6.10
62+
- Vue 2.6.11
6363

6464
# Quick start
6565

nuxt/index.js

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
const { resolve } = require('path')
2+
3+
const pickFirst = (...args) => {
4+
for (const arg of args) {
5+
if (arg !== undefined) {
6+
return arg
7+
}
8+
}
9+
}
10+
11+
// --- Main Nuxt.js module ---
12+
module.exports = function nuxtMDBVue(moduleOptions = {}) {
13+
this.nuxt.hook('build:before', () => {
14+
// Merge moduleOptions with default
15+
const options = {
16+
...this.options.mdbvue,
17+
...moduleOptions
18+
}
19+
20+
// Ensure we have arrays
21+
this.options.css = [].concat(this.options.css || [])
22+
this.options.build.transpile = [].concat(this.options.build.transpile || [])
23+
24+
const roboto = pickFirst(
25+
options.roboto,
26+
// Defaults to `true` if no other options provided
27+
true
28+
)
29+
30+
if (roboto) {
31+
this.options.head.link.push({
32+
rel: 'stylesheet',
33+
href: 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap'
34+
})
35+
}
36+
37+
const icons = pickFirst(
38+
options.icons,
39+
// Defaults to `true` if no other options provided
40+
true
41+
)
42+
43+
if (icons) {
44+
this.options.css.unshift('@fortawesome/fontawesome-free/css/all.min.css')
45+
}
46+
47+
const css = pickFirst(
48+
options.css,
49+
// Defaults to `true` if no other options provided
50+
true
51+
)
52+
53+
if (css) {
54+
this.options.css.unshift('mdbvue/lib/css/mdb.min.css')
55+
}
56+
57+
const bootstrap = pickFirst(
58+
options.bootstrap,
59+
// Defaults to `true` if no other options provided
60+
true
61+
)
62+
63+
if (bootstrap) {
64+
this.options.css.unshift('bootstrap-css-only/css/bootstrap.min.css')
65+
}
66+
67+
const plugins = pickFirst(
68+
options.plugins,
69+
// Defaults to `true` if no other options provided
70+
true
71+
)
72+
73+
// plugins
74+
if (plugins) {
75+
this.addPlugin({
76+
src: resolve(__dirname, 'touchEvents.js'),
77+
fileName: 'touchEvents.js'
78+
})
79+
}
80+
81+
// tree-shaking
82+
this.options.build.transpile.push('mdbvue/lib/components')
83+
84+
})
85+
}
86+
87+
module.exports.meta = require('../package.json')

nuxt/touchEvents.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import Vue from 'vue'
2+
import Vue2TouchEvents from 'vue2-touch-events'
3+
Vue.use(Vue2TouchEvents)

package.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
"license": "MIT",
77
"main": "./lib",
88
"files": [
9-
"lib/*"
9+
"lib/*",
10+
"nuxt/*",
11+
"src/components",
12+
"src/directives",
13+
"src/mixins"
1014
],
1115
"dependencies": {
1216
"@fortawesome/fontawesome-free": "^5.11.2",
@@ -16,15 +20,15 @@
1620
"core-js": "^3.1.2",
1721
"moment": "^2.24.0",
1822
"popper.js": "^1.16.0",
19-
"vue": "^2.6.10",
23+
"vue": "^2.6.11",
2024
"vue-chartjs": "^3.4.2",
2125
"vue-clickaway": "^2.2.2",
2226
"vue-numeric": "^2.3.0",
2327
"vue-plugin-load-script": "^1.2.0",
24-
"vue-router": "^3.0.3",
28+
"vue-router": "^3.1.3",
2529
"vue2-perfect-scrollbar": "^1.2.1",
26-
"vue2-touch-events": "^2.0.0",
27-
"vuex": "^3.0.1"
30+
"vue2-touch-events": "^2.1.0",
31+
"vuex": "^3.1.2"
2832
},
2933
"browserslist": [
3034
"> 1%",

0 commit comments

Comments
 (0)