Skip to content

Commit 5a7e13a

Browse files
Upgrade to Bootstrap v3.4.1 (#7014)
* Upgrade bootstrap sources to v3.4.1 * Generated distributable css and js for bootstrap v3.4.1 * Removed unnecessary npm devDependencies * Removing bootstrap docs from the repository
1 parent 80b511b commit 5a7e13a

302 files changed

Lines changed: 3810 additions & 47381 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Bootstrap/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Thumbs.db
3737
docs/.jekyll-metadata
3838

3939
# Folders to ignore
40+
/.bundle/
41+
/vendor/
4042
bower_components
4143
node_modules
4244

src/Bootstrap/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Bootstrap uses [GitHub's Releases feature](https://github.com/blog/1547-release-your-software) for its changelogs.
1+
Bootstrap uses [GitHub's Releases feature](https://blog.github.com/2013-07-02-release-your-software/) for its changelogs.
22

33
See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap.
44

5-
Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release.
5+
Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com/) contain summaries of the most noteworthy changes made in each release.

src/Bootstrap/CONTRIBUTING.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ restrictions:
2525
respect the opinions of others.
2626

2727
* Please **do not** post comments consisting solely of "+1" or ":thumbsup:".
28-
Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments)
28+
Use [GitHub's "reactions" feature](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)
2929
instead. We reserve the right to delete comments which violate this rule.
3030

3131
* Please **do not** open issues or pull requests regarding the code in
3232
[`Normalize`](https://github.com/necolas/normalize.css) (open them in
3333
their respective repositories).
3434

35-
* Please **do not** open issues regarding the official themes offered on <http://themes.getbootstrap.com/>.
35+
* Please **do not** open issues regarding the official themes offered on <https://themes.getbootstrap.com/>.
3636
Instead, please email any questions or feedback regarding those themes to `themes AT getbootstrap DOT com`.
3737

3838

@@ -62,7 +62,7 @@ Good bug reports are extremely helpful, so thanks!
6262

6363
Guidelines for bug reports:
6464

65-
0. **Validate and lint your code** &mdash; [validate your HTML](http://html5.validator.nu)
65+
0. **Validate and lint your code** &mdash; [validate your HTML](https://html5.validator.nu/)
6666
and [lint your HTML](https://github.com/twbs/bootlint) to ensure your
6767
problem isn't caused by a simple error in your own code.
6868

@@ -105,7 +105,7 @@ Example:
105105
### Reporting upstream browser bugs
106106

107107
Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se.
108-
When feasible, we aim to report such upstream bugs to the relevant browser vendor(s), and then list them on our [Wall of Browser Bugs](http://getbootstrap.com/browser-bugs/) and [document them in MDN](https://developer.mozilla.org/en-US/docs/Web).
108+
When feasible, we aim to report such upstream bugs to the relevant browser vendor(s), and then list them on our [Wall of Browser Bugs](https://getbootstrap.com/docs/3.4/browser-bugs/) and [document them in MDN](https://developer.mozilla.org/en-US/docs/Web).
109109

110110
| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes |
111111
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------- |
@@ -199,7 +199,7 @@ included in the project:
199199
4. Commit your changes in logical chunks. Please adhere to these [git commit
200200
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
201201
or your code is unlikely to be merged into the main project. Use Git's
202-
[interactive rebase](https://help.github.com/articles/interactive-rebase)
202+
[interactive rebase](https://help.github.com/articles/about-git-rebase/)
203203
feature to tidy up your commits before making them public.
204204

205205
5. Locally merge (or rebase) the upstream development branch into your topic branch:
@@ -223,16 +223,6 @@ includes code changes) and under the terms of the
223223
[Creative Commons Attribution 3.0 Unported License](docs/LICENSE)
224224
(if it includes documentation changes).
225225

226-
### Pull request bots
227-
228-
[@twbs-rorschach](https://github.com/twbs-rorschach) is a Bootstrap bot that hangs out in our GitHub issue tracker and automatically checks all pull requests for a few simple common mistakes. It's possible that Rorschach might leave a comment on your pull request and then close it. If that happens, simply fix the problem(s) mentioned in the comment (there should be link(s) in the comment explaining the problem(s) in detail) and then either:
229-
230-
* Push the revised version to your pull request's branch and post a comment on the pull request saying that you've fixed the problem(s). One of the Bootstrap Core Team members will then come along and reopen your pull request.
231-
* Or you can just open a new pull request for your revised version.
232-
233-
[@twbs-savage](https://github.com/twbs-savage) is a Bootstrap bot that automatically runs cross-browser tests (via [Sauce](https://saucelabs.com) and Travis CI) on JavaScript pull requests. Savage will leave a comment on pull requests stating whether cross-browser JS tests passed or failed, with a link to the full Travis build details. If your pull request fails, check the Travis log to see which browser + OS combinations failed. Each browser test in the Travis log includes a link to a Sauce page with details about the test. On those details pages, you can watch a screencast of the test run to see exactly which unit tests failed.
234-
235-
236226
## Code guidelines
237227

238228
### HTML
@@ -247,16 +237,16 @@ includes code changes) and under the terms of the
247237

248238
[Adhere to the Code Guide.](http://codeguide.co/#css)
249239

250-
- When feasible, default color palettes should comply with [WCAG color contrast guidelines](http://www.w3.org/TR/WCAG20/#visual-audio-contrast).
251-
- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](http://a11yproject.com/posts/never-remove-css-outlines) for more details.
240+
- When feasible, default color palettes should comply with [WCAG color contrast guidelines](https://www.w3.org/TR/WCAG20/#visual-audio-contrast).
241+
- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](https://a11yproject.com/posts/never-remove-css-outlines/) for more details.
252242

253243
### JS
254244

255245
- No semicolons (in client-side JS)
256246
- 2 spaces (no tabs)
257247
- strict mode
258248
- "Attractive"
259-
- Don't use [jQuery event alias convenience methods](https://github.com/jquery/jquery/blob/master/src/event/alias.js) (such as `$().focus()`). Instead, use [`$().trigger(eventType, ...)`](http://api.jquery.com/trigger/) or [`$().on(eventType, ...)`](http://api.jquery.com/on/), depending on whether you're firing an event or listening for an event. (For example, `$().trigger('focus')` or `$().on('focus', function (event) { /* handle focus event */ })`) We do this to be compatible with custom builds of jQuery where the event aliases module has been excluded.
249+
- Don't use [jQuery event alias convenience methods](https://github.com/jquery/jquery/blob/master/src/event/alias.js) (such as `$().focus()`). Instead, use [`$().trigger(eventType, ...)`](https://api.jquery.com/trigger/) or [`$().on(eventType, ...)`](https://api.jquery.com/on/), depending on whether you're firing an event or listening for an event. (For example, `$().trigger('focus')` or `$().on('focus', function (event) { /* handle focus event */ })`) We do this to be compatible with custom builds of jQuery where the event aliases module has been excluded.
260250

261251
### Checking coding style
262252

src/Bootstrap/Gruntfile.js

Lines changed: 58 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* Bootstrap's Gruntfile
3-
* http://getbootstrap.com
4-
* Copyright 2013-2016 Twitter, Inc.
3+
* https://getbootstrap.com/
4+
* Copyright 2013-2019 Twitter, Inc.
55
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
66
*/
77

@@ -50,16 +50,15 @@ module.exports = function (grunt) {
5050

5151
// Task configuration.
5252
clean: {
53-
dist: 'dist',
54-
docs: 'docs/dist'
53+
dist: 'dist'
5554
},
5655

5756
concat: {
5857
options: {
5958
banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>',
6059
stripBanners: false
6160
},
62-
bootstrap: {
61+
core: {
6362
src: [
6463
'js/transition.js',
6564
'js/alert.js',
@@ -80,43 +79,40 @@ module.exports = function (grunt) {
8079

8180
uglify: {
8281
options: {
83-
compress: {
84-
warnings: false
85-
},
82+
compress: true,
8683
mangle: true,
87-
preserveComments: /^!|@preserve|@license|@cc_on/i
84+
ie8: true,
85+
output: {
86+
comments: /^!|@preserve|@license|@cc_on/i
87+
}
8888
},
8989
core: {
90-
src: '<%= concat.bootstrap.dest %>',
90+
src: '<%= concat.core.dest %>',
9191
dest: 'dist/js/<%= pkg.name %>.min.js'
9292
},
9393
customize: {
9494
src: configBridge.paths.customizerJs,
9595
dest: 'docs/assets/js/customize.min.js'
96-
},
97-
docsJs: {
98-
src: configBridge.paths.docsJs,
99-
dest: 'docs/assets/js/docs.min.js'
10096
}
10197
},
10298

10399
less: {
104-
compileCore: {
100+
options: {
101+
ieCompat: true,
102+
strictMath: true,
103+
sourceMap: true,
104+
outputSourceFiles: true
105+
},
106+
core: {
105107
options: {
106-
strictMath: true,
107-
sourceMap: true,
108-
outputSourceFiles: true,
109108
sourceMapURL: '<%= pkg.name %>.css.map',
110109
sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map'
111110
},
112111
src: 'less/bootstrap.less',
113112
dest: 'dist/css/<%= pkg.name %>.css'
114113
},
115-
compileTheme: {
114+
theme: {
116115
options: {
117-
strictMath: true,
118-
sourceMap: true,
119-
outputSourceFiles: true,
120116
sourceMapURL: '<%= pkg.name %>-theme.css.map',
121117
sourceMapFilename: 'dist/css/<%= pkg.name %>-theme.css.map'
122118
},
@@ -125,133 +121,61 @@ module.exports = function (grunt) {
125121
}
126122
},
127123

128-
autoprefixer: {
124+
postcss: {
129125
options: {
130-
browsers: configBridge.config.autoprefixerBrowsers
126+
map: {
127+
inline: false,
128+
sourcesContent: true
129+
},
130+
processors: [
131+
require('autoprefixer')(configBridge.config.autoprefixer)
132+
]
131133
},
132134
core: {
133-
options: {
134-
map: true
135-
},
136135
src: 'dist/css/<%= pkg.name %>.css'
137136
},
138137
theme: {
139-
options: {
140-
map: true
141-
},
142138
src: 'dist/css/<%= pkg.name %>-theme.css'
143-
},
144-
docs: {
145-
src: ['docs/assets/css/src/docs.css']
146-
},
147-
examples: {
148-
expand: true,
149-
cwd: 'docs/examples/',
150-
src: ['**/*.css'],
151-
dest: 'docs/examples/'
152139
}
153140
},
154141

155142
cssmin: {
156143
options: {
157-
// TODO: disable `zeroUnits` optimization once clean-css 3.2 is released
158-
// and then simplify the fix for https://github.com/twbs/bootstrap/issues/14837 accordingly
159144
compatibility: 'ie8',
160-
keepSpecialComments: '*',
161145
sourceMap: true,
162146
sourceMapInlineSources: true,
163-
advanced: false
147+
level: {
148+
1: {
149+
specialComments: 'all'
150+
}
151+
}
164152
},
165-
minifyCore: {
153+
core: {
166154
src: 'dist/css/<%= pkg.name %>.css',
167155
dest: 'dist/css/<%= pkg.name %>.min.css'
168156
},
169-
minifyTheme: {
157+
theme: {
170158
src: 'dist/css/<%= pkg.name %>-theme.css',
171159
dest: 'dist/css/<%= pkg.name %>-theme.min.css'
172-
},
173-
docs: {
174-
src: [
175-
'docs/assets/css/ie10-viewport-bug-workaround.css',
176-
'docs/assets/css/src/pygments-manni.css',
177-
'docs/assets/css/src/docs.css'
178-
],
179-
dest: 'docs/assets/css/docs.min.css'
180-
}
181-
},
182-
183-
csscomb: {
184-
options: {
185-
config: 'less/.csscomb.json'
186-
},
187-
dist: {
188-
expand: true,
189-
cwd: 'dist/css/',
190-
src: ['*.css', '!*.min.css'],
191-
dest: 'dist/css/'
192-
},
193-
examples: {
194-
expand: true,
195-
cwd: 'docs/examples/',
196-
src: '**/*.css',
197-
dest: 'docs/examples/'
198-
},
199-
docs: {
200-
src: 'docs/assets/css/src/docs.css',
201-
dest: 'docs/assets/css/src/docs.css'
202160
}
203161
},
204162

205163
copy: {
206-
docs: {
207-
expand: true,
208-
cwd: 'dist/',
209-
src: [
210-
'**/*'
211-
],
212-
dest: 'docs/dist/'
213-
},
214-
gallerycss: {
215-
expand: true,
216-
cwd: 'dist/css/',
217-
src: [
218-
'bootstrap.css',
219-
'bootstrap-theme.css'
220-
],
221-
dest: '../NuGetGallery/Content/gallery/css/'
222-
},
223-
galleryjs: {
164+
fonts: {
224165
expand: true,
225-
cwd: 'dist/js/',
226-
src: [
227-
'bootstrap.js'
228-
],
229-
dest: '../NuGetGallery/Scripts/gallery/'
166+
src: 'fonts/**',
167+
dest: 'dist/'
230168
}
231169
},
232170

233-
compress: {
234-
main: {
235-
options: {
236-
archive: 'bootstrap-<%= pkg.version %>-dist.zip',
237-
mode: 'zip',
238-
level: 9,
239-
pretty: true
240-
},
241-
files: [
242-
{
243-
expand: true,
244-
cwd: 'dist/',
245-
src: ['**'],
246-
dest: 'bootstrap-<%= pkg.version %>-dist'
247-
}
248-
]
171+
watch: {
172+
less: {
173+
files: 'less/**/*.less',
174+
tasks: ['less', 'copy']
249175
}
250176
}
251-
252177
});
253178

254-
255179
// These plugins provide necessary tasks.
256180
require('load-grunt-tasks')(grunt, { scope: 'devDependencies' });
257181
require('time-grunt')(grunt);
@@ -260,18 +184,31 @@ module.exports = function (grunt) {
260184
grunt.registerTask('dist-js', ['concat', 'uglify:core', 'commonjs']);
261185

262186
// CSS distribution task.
263-
grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']);
264-
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer:core', 'autoprefixer:theme', 'csscomb:dist', 'cssmin:minifyCore', 'cssmin:minifyTheme']);
187+
grunt.registerTask('dist-css', ['less:core', 'less:theme', 'postcss:core', 'postcss:theme', 'cssmin:core', 'cssmin:theme']);
265188

266189
// Full distribution task.
267-
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js', 'copy:gallerycss', 'copy:galleryjs']);
190+
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'copy:fonts', 'dist-js']);
268191

269192
// Default task.
270-
grunt.registerTask('default', ['dist']);
193+
grunt.registerTask('default', ['clean:dist', 'copy:fonts', 'dist-css', 'dist-js']);
194+
195+
grunt.registerTask('build-glyphicons-data', function () {
196+
generateGlyphiconsData.call(this, grunt);
197+
});
198+
199+
// task for building customizer
200+
grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']);
201+
grunt.registerTask('build-customizer-html');
202+
grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () {
203+
var banner = grunt.template.process('<%= banner %>');
204+
generateRawFiles(grunt, banner);
205+
});
271206

272207
grunt.registerTask('commonjs', 'Generate CommonJS entrypoint module in dist dir.', function () {
273-
var srcFiles = grunt.config.get('concat.bootstrap.src');
208+
var srcFiles = grunt.config.get('concat.core.src');
274209
var destFilepath = 'dist/js/npm.js';
275210
generateCommonJSModule(grunt, srcFiles, destFilepath);
276211
});
212+
213+
grunt.registerTask('prep-release', ['dist']);
277214
};

src/Bootstrap/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Before opening an issue:
22

33
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
4-
- [Validate](http://validator.w3.org/nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
4+
- [Validate](https://validator.w3.org/nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
55
- Prepare a [reduced test case](https://css-tricks.com/reduced-test-cases/) for any bugs
66
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)
77

@@ -14,7 +14,7 @@ When reporting a bug, include:
1414

1515
- Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile)
1616
- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
17-
- Reduced test cases and potential fixes using [JS Bin](https://jsbin.com)
17+
- Reduced test cases and potential fixes using [JS Bin](https://jsbin.com/)
1818

1919
When suggesting a feature, include:
2020

0 commit comments

Comments
 (0)