Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fleck/bootstrap.native-loader
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: conversejs/bootstrap.native-loader
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Apr 18, 2019

  1. Support for bootstrap.native 2.0.26

    The build-module.js script has been moved to the `./lib` directory and
    takes a new parameter `bs_version`.
    jcbrand committed Apr 18, 2019
    Copy the full SHA
    d8fcbc0 View commit details
Showing with 3 additions and 6 deletions.
  1. +2 −0 README.md
  2. +1 −6 index.js
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ There's also an only option. (cannot be used at the same time as the ignore opti
use: {
loader: 'bootstrap.native-loader',
options: {
bs_version: 4,
only: ['modal', 'dropdown']
}
}
@@ -37,6 +38,7 @@ Also, an ignore option. (cannot be used at the same time as the only option)
use: {
loader: 'bootstrap.native-loader',
options: {
bs_version: 4,
ignore: ['carousel', 'button']
}
}
7 changes: 1 addition & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
const bsn3 = require('bootstrap.native/build-module.js')
let bsn = require('bootstrap.native/build-module-v4.js')
const bsn = require('bootstrap.native/lib/build-module.js')
const { getOptions } = require('loader-utils')

module.exports = function () {
this.cacheable = true
const callback = this.async()
const options = getOptions(this) || {}

if (options.bsVersion === 3) {
bsn = bsn3
}

bsn(options).then((source) => {
callback(null, source)
}).catch((error) => {