Skip to content

Commit

Permalink
Merge branch 'v4-dev' into v4-dev-andres-tooltip-horizontal-form
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Oct 13, 2018
2 parents 8a641be + b2b933c commit cc308b2
Show file tree
Hide file tree
Showing 37 changed files with 3,887 additions and 3,850 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
@@ -1,5 +1,4 @@
sudo: required
dist: trusty
addons:
chrome: stable
language: node_js
Expand Down Expand Up @@ -29,3 +28,5 @@ cache:
directories:
- node_modules
- vendor/bundle
notifications:
email: false
4 changes: 2 additions & 2 deletions Gemfile
@@ -1,8 +1,8 @@
source 'https://rubygems.org'

group :development, :test do
gem 'jekyll', '~> 3.8.3'
gem 'jekyll', '~> 3.8.4'
gem 'jekyll-redirect-from', '~> 0.14.0'
gem 'jekyll-sitemap', '~> 1.2.0'
gem 'jekyll-toc', '~> 0.6.0'
gem 'jekyll-toc', '~> 0.7.1'
end
18 changes: 9 additions & 9 deletions Gemfile.lock
Expand Up @@ -16,7 +16,7 @@ GEM
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.3)
jekyll (3.8.4)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
Expand All @@ -35,7 +35,7 @@ GEM
sass (~> 3.4)
jekyll-sitemap (1.2.0)
jekyll (~> 3.3)
jekyll-toc (0.6.0)
jekyll-toc (0.7.1)
nokogiri (~> 1.7)
jekyll-watch (2.0.0)
listen (~> 3.0)
Expand All @@ -47,20 +47,20 @@ GEM
ruby_dep (~> 1.2)
mercenary (0.3.6)
mini_portile2 (2.3.0)
nokogiri (1.8.4)
nokogiri (1.8.5)
mini_portile2 (~> 2.3.0)
nokogiri (1.8.4-x64-mingw32)
nokogiri (1.8.5-x64-mingw32)
mini_portile2 (~> 2.3.0)
pathutil (0.16.1)
forwardable-extended (~> 2.6)
public_suffix (3.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (3.2.1)
rouge (3.3.0)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.5.7)
sass (3.6.0)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
Expand All @@ -71,10 +71,10 @@ PLATFORMS
x64-mingw32

DEPENDENCIES
jekyll (~> 3.8.3)
jekyll (~> 3.8.4)
jekyll-redirect-from (~> 0.14.0)
jekyll-sitemap (~> 1.2.0)
jekyll-toc (~> 0.6.0)
jekyll-toc (~> 0.7.1)

BUNDLED WITH
1.16.3
1.16.6
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -154,7 +154,7 @@ Get updates on Bootstrap's development and chat with the project maintainers and

## Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](https://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible.
For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](https://semver.org/). Sometimes we screw up, but we adhere to those rules whenever possible.

See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com/) contain summaries of the most noteworthy changes made in each release.

Expand Down
13 changes: 13 additions & 0 deletions build/banner.js
@@ -0,0 +1,13 @@
const path = require('path')
const pkg = require(path.resolve(__dirname, '../package.json'))
const year = new Date().getFullYear()

function getBanner(pluginFilename) {
return `/*!
* Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage})
* Copyright 2011-${year} ${pkg.author}
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/`
}

module.exports = getBanner
77 changes: 40 additions & 37 deletions build/build-plugins.js
Expand Up @@ -5,11 +5,12 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

const rollup = require('rollup')
const path = require('path')
const rollup = require('rollup')
const babel = require('rollup-plugin-babel')
const TEST = process.env.NODE_ENV === 'test'
const banner = require('./banner.js')

const TEST = process.env.NODE_ENV === 'test'
const plugins = [
babel({
exclude: 'node_modules/**', // Only transpile our source code
Expand All @@ -22,9 +23,6 @@ const plugins = [
]
})
]

const format = 'umd'
const rootPath = !TEST ? '../js/dist/' : '../js/coverage/dist/'
const bsPlugins = {
Alert: path.resolve(__dirname, '../js/src/alert.js'),
Button: path.resolve(__dirname, '../js/src/button.js'),
Expand All @@ -38,42 +36,47 @@ const bsPlugins = {
Tooltip: path.resolve(__dirname, '../js/src/tooltip.js'),
Util: path.resolve(__dirname, '../js/src/util.js')
}
const rootPath = TEST ? '../js/coverage/dist/' : '../js/dist/'

function build(plugin) {
console.log(`Building ${plugin} plugin...`)

Object.keys(bsPlugins)
.forEach((pluginKey) => {
console.log(`Building ${pluginKey} plugin...`)
const external = ['jquery', 'popper.js']
const globals = {
jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
'popper.js': 'Popper'
}

const external = ['jquery', 'popper.js']
const globals = {
jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
'popper.js': 'Popper'
}
// Do not bundle Util in plugins
if (plugin !== 'Util') {
external.push(bsPlugins.Util)
globals[bsPlugins.Util] = 'Util'
}

// Do not bundle Util in plugins
if (pluginKey !== 'Util') {
external.push(bsPlugins.Util)
globals[bsPlugins.Util] = 'Util'
}
// Do not bundle Tooltip in Popover
if (plugin === 'Popover') {
external.push(bsPlugins.Tooltip)
globals[bsPlugins.Tooltip] = 'Tooltip'
}

// Do not bundle Tooltip in Popover
if (pluginKey === 'Popover') {
external.push(bsPlugins.Tooltip)
globals[bsPlugins.Tooltip] = 'Tooltip'
}
const pluginFilename = `${plugin.toLowerCase()}.js`

rollup.rollup({
input: bsPlugins[pluginKey],
plugins,
external
}).then((bundle) => {
bundle.write({
format,
name: pluginKey,
sourcemap: true,
globals,
file: path.resolve(__dirname, `${rootPath}${pluginKey.toLowerCase()}.js`)
})
.then(() => console.log(`Building ${pluginKey} plugin... Done!`))
.catch((err) => console.error(`${pluginKey}: ${err}`))
rollup.rollup({
input: bsPlugins[plugin],
plugins,
external
}).then((bundle) => {
bundle.write({
banner: banner(pluginFilename),
format: 'umd',
name: plugin,
sourcemap: true,
globals,
file: path.resolve(__dirname, `${rootPath}${pluginFilename}`)
})
.then(() => console.log(`Building ${plugin} plugin... Done!`))
.catch((err) => console.error(`${plugin}: ${err}`))
})
}

Object.keys(bsPlugins).forEach((plugin) => build(plugin))
9 changes: 2 additions & 7 deletions build/rollup.config.js
@@ -1,10 +1,9 @@
const path = require('path')
const babel = require('rollup-plugin-babel')
const resolve = require('rollup-plugin-node-resolve')
const banner = require('./banner.js')

const pkg = require(path.resolve(__dirname, '../package.json'))
const BUNDLE = process.env.BUNDLE === 'true'
const year = new Date().getFullYear()

let fileDest = 'bootstrap.js'
const external = ['jquery', 'popper.js']
Expand Down Expand Up @@ -36,11 +35,7 @@ if (BUNDLE) {
module.exports = {
input: path.resolve(__dirname, '../js/src/index.js'),
output: {
banner: `/*!
* Bootstrap v${pkg.version} (${pkg.homepage})
* Copyright 2011-${year} ${pkg.author}
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/`,
banner,
file: path.resolve(__dirname, `../dist/js/${fileDest}`),
format: 'umd',
globals,
Expand Down

0 comments on commit cc308b2

Please sign in to comment.