StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
1.8 KiB
81 lines
1.8 KiB
4 years ago
|
const { resolve } = require('path')
|
||
|
|
||
|
const pickFirst = (...args) => {
|
||
|
for (const arg of args) {
|
||
|
if (arg !== undefined) {
|
||
|
return arg
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// --- Main Nuxt.js module ---
|
||
|
module.exports = function nuxtMDBVue(moduleOptions = {}) {
|
||
|
this.nuxt.hook('build:before', () => {
|
||
|
// Merge moduleOptions with default
|
||
|
const options = {
|
||
|
...this.options.mdbvue,
|
||
|
...moduleOptions
|
||
|
}
|
||
|
|
||
|
// Ensure we have arrays
|
||
|
this.options.css = [].concat(this.options.css || [])
|
||
|
this.options.build.transpile = [].concat(this.options.build.transpile || [])
|
||
|
|
||
|
const roboto = pickFirst(
|
||
|
options.roboto,
|
||
|
// Defaults to `true` if no other options provided
|
||
|
true
|
||
|
)
|
||
|
|
||
|
if (roboto) {
|
||
|
this.options.head.link.push({
|
||
|
rel: 'stylesheet',
|
||
|
href: 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap'
|
||
|
})
|
||
|
}
|
||
|
|
||
|
const icons = pickFirst(
|
||
|
options.icons,
|
||
|
// Defaults to `true` if no other options provided
|
||
|
true
|
||
|
)
|
||
|
|
||
|
if (icons) {
|
||
|
this.options.css.unshift('@fortawesome/fontawesome-free/css/all.min.css')
|
||
|
}
|
||
|
|
||
|
const css = pickFirst(
|
||
|
options.css,
|
||
|
// Defaults to `true` if no other options provided
|
||
|
true
|
||
|
)
|
||
|
|
||
|
if (css) {
|
||
|
this.options.css.unshift('mdbvue/lib/css/mdb.min.css')
|
||
|
}
|
||
|
|
||
|
const bootstrap = pickFirst(
|
||
|
options.bootstrap,
|
||
|
// Defaults to `true` if no other options provided
|
||
|
true
|
||
|
)
|
||
|
|
||
|
if (bootstrap) {
|
||
|
this.options.css.unshift('bootstrap-css-only/css/bootstrap.min.css')
|
||
|
}
|
||
|
|
||
|
const plugins = pickFirst(
|
||
|
options.plugins,
|
||
|
// Defaults to `true` if no other options provided
|
||
|
true
|
||
|
)
|
||
|
|
||
|
// plugins
|
||
|
|
||
|
// tree-shaking
|
||
|
this.options.build.transpile.push('mdbvue/lib/components')
|
||
|
|
||
|
})
|
||
|
}
|
||
|
|
||
|
module.exports.meta = require('../package.json')
|