<commit_before>const camelCase = require('lodash/camelCase')
const kebabCase = require('lodash/kebabCase')
const upperFirst = require('lodash/upperFirst')
const { resolve } = require('path')

// --- Utility methods ---

const pascalCase = str => upperFirst(camelCase(str))

const pickFirst = (...args) => {
  for (const arg of args) {
    if (arg !== undefined) {
      return arg
    }
  }
}

module.exports = function nuxtBootstrapVue(moduleOptions = {}) {
  this.nuxt.hook('build:before', () => {
    // Merge moduleOptions with default
    const options = {
      ...this.options.bootstrapVue,
      ...moduleOptions
    }

    const bootstrapVueCSS = pickFirst(
      options.bootstrapVueCSS,
      options.bootstrapVueCss,
      options.bvCSS,
      // Defaults to `true` if no other options provided
      true
    )
    if (bootstrapVueCSS) {
      // Add BootstrapVue CSS
      this.options.css.unshift('bootstrap-vue/dist/bootstrap-vue.css')
    }

    const bootstrapCSS = pickFirst(
      options.bootstrapCSS,
      options.bootstrapCss,<commit_msg>fix(nuxt module): ensure that css and transpile are arrays (fixes: #3141) (#3142)<commit_after>const camelCase = require('lodash/camelCase')
const kebabCase = require('lodash/kebabCase')
const upperFirst = require('lodash/upperFirst')
const { resolve } = require('path')

// --- Utility methods ---

const pascalCase = str => upperFirst(camelCase(str))

const pickFirst = (...args) => {
  for (const arg of args) {
    if (arg !== undefined) {
      return arg
    }
  }
}

module.exports = function nuxtBootstrapVue(moduleOptions = {}) {
  this.nuxt.hook('build:before', () => {
    // Merge moduleOptions with default
    const options = {
      ...this.options.bootstrapVue,
      ...moduleOptions
    }

    // Ensure we have arrays
    this.options.css = this.options.css || []
    this.options.build.transpile = this.options.build.transpile || []

    const bootstrapVueCSS = pickFirst(
      options.bootstrapVueCSS,
      options.bootstrapVueCss,
      options.bvCSS,
      // Defaults to `true` if no other options provided
      true
    )
    if (bootstrapVueCSS) {
      // Add BootstrapVue CSS
      this.options.css.unshift('bootstrap-vue/dist/bootstrap-vue.css')
    }

    const bootstrapCSS = pickFirst(
      options.bootstrapCSS,
      options.bootstrapCss,
{'fraction_non_alphanumeric': 0.12917023096663816, 'fraction_numerical': 0.003421727972626176, 'mean_word_length': 2.8983333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5673052', 'n_tokens_mistral': 746, 'n_tokens_neox': 712, 'n_words': 156}