forked from twbs/bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
275 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,5 @@ | |
} | ||
] | ||
], | ||
"plugins": [ | ||
"transform-es2015-modules-strip" | ||
] | ||
"plugins": ["external-helpers"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
const path = require('path') | ||
const babel = require('rollup-plugin-babel') | ||
const resolve = require('rollup-plugin-node-resolve') | ||
const pkg = require(path.resolve(__dirname, '../package.json')) | ||
const BUNDLE = process.env.BUNDLE === 'true' | ||
const year = new Date().getFullYear() | ||
|
||
var fileDest = 'bootstrap.js' | ||
var external = ['jquery', 'popper.js'] | ||
const plugins = [ | ||
babel({ | ||
exclude: 'node_modules/**', // only transpile our source code | ||
externalHelpersWhitelist: [ // include only required helpers | ||
'typeof', | ||
'classCallCheck', | ||
'createClass', | ||
'inherits', | ||
'possibleConstructorReturn' | ||
] | ||
}) | ||
] | ||
const globals = { | ||
jquery: '$', | ||
'popper.js': 'Popper' | ||
} | ||
|
||
if (BUNDLE) { | ||
fileDest = 'bootstrap.bundle.js' | ||
// remove last entry in external array to bundle Popper | ||
external.pop() | ||
delete globals['popper.js'] | ||
plugins.push(resolve()) | ||
} | ||
|
||
module.exports = { | ||
input: path.resolve(__dirname, '../js/src/index.js'), | ||
output: { | ||
file: path.resolve(__dirname, `../dist/js/${fileDest}`), | ||
format: 'iife' | ||
}, | ||
name: 'bootstrap', | ||
external: external, | ||
globals: globals, | ||
plugins: plugins, | ||
banner: `/*! | ||
* Bootstrap v${pkg.version} (${pkg.homepage}) | ||
* Copyright 2011-${year} ${pkg.author} | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
*/ | ||
` | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"output" : { | ||
"output": { | ||
"comments": "/^!/" | ||
} | ||
}, | ||
"compress": { | ||
"typeofs": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import $ from 'jquery' | ||
import Alert from './alert' | ||
import Button from './button' | ||
import Carousel from './carousel' | ||
import Collapse from './collapse' | ||
import Dropdown from './dropdown' | ||
import Modal from './modal' | ||
import Popover from './popover' | ||
import Scrollspy from './scrollspy' | ||
import Tab from './tab' | ||
import Tooltip from './tooltip' | ||
import Util from './util' | ||
|
||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.6): index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
|
||
(() => { | ||
if (typeof jQuery === 'undefined') { | ||
throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.') | ||
} | ||
|
||
const version = $.fn.jquery.split(' ')[0].split('.') | ||
const min = 3 | ||
const max = 4 | ||
if (version[0] < min || version[0] >= max) { | ||
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v3.0.0 but less than v4.0.0') | ||
} | ||
})(jQuery) | ||
|
||
export { | ||
Util, | ||
Alert, | ||
Button, | ||
Carousel, | ||
Collapse, | ||
Dropdown, | ||
Modal, | ||
Popover, | ||
Scrollspy, | ||
Tab, | ||
Tooltip | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.