mirror of
https://github.com/twbs/bootstrap.git
synced 2025-10-03 00:31:55 +02:00
Merge branch 'minify-assets' of https://github.com/XhmikosR/bootstrap into XhmikosR-minify-assets
Conflicts: package.json
This commit is contained in:
48
Gruntfile.js
48
Gruntfile.js
@@ -26,7 +26,13 @@ module.exports = function (grunt) {
|
|||||||
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
|
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
|
||||||
' * Licensed under <%= _.pluck(pkg.licenses, "type") %> (<%= _.pluck(pkg.licenses, "url") %>)\n' +
|
' * Licensed under <%= _.pluck(pkg.licenses, "type") %> (<%= _.pluck(pkg.licenses, "url") %>)\n' +
|
||||||
' */\n',
|
' */\n',
|
||||||
jqueryCheck: 'if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }\n\n',
|
bannerDocs: '/*!\n' +
|
||||||
|
' * Bootstrap Docs (<%= pkg.homepage %>)\n' +
|
||||||
|
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
|
||||||
|
' * Licensed under the Creative Commons Attribution 3.0 Unported License. For\n' +
|
||||||
|
' * details, see http://creativecommons.org/licenses/by/3.0/.\n' +
|
||||||
|
' */\n',
|
||||||
|
jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Bootstrap requires jQuery\') }\n\n',
|
||||||
|
|
||||||
// Task configuration.
|
// Task configuration.
|
||||||
clean: {
|
clean: {
|
||||||
@@ -113,7 +119,7 @@ module.exports = function (grunt) {
|
|||||||
uglify: {
|
uglify: {
|
||||||
bootstrap: {
|
bootstrap: {
|
||||||
options: {
|
options: {
|
||||||
banner: '<%= banner %>\n',
|
banner: '<%= banner %>',
|
||||||
report: 'min'
|
report: 'min'
|
||||||
},
|
},
|
||||||
src: ['<%= concat.bootstrap.dest %>'],
|
src: ['<%= concat.bootstrap.dest %>'],
|
||||||
@@ -121,12 +127,7 @@ module.exports = function (grunt) {
|
|||||||
},
|
},
|
||||||
customize: {
|
customize: {
|
||||||
options: {
|
options: {
|
||||||
banner: '/*!\n' +
|
banner: '<%= bannerDocs %>',
|
||||||
' * Bootstrap Docs (<%= pkg.homepage %>)\n' +
|
|
||||||
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
|
|
||||||
' * Licensed under the Creative Commons Attribution 3.0 Unported License. For\n' +
|
|
||||||
' * details, see http://creativecommons.org/licenses/by/3.0/.\n' +
|
|
||||||
' */\n',
|
|
||||||
report: 'min'
|
report: 'min'
|
||||||
},
|
},
|
||||||
src: [
|
src: [
|
||||||
@@ -134,9 +135,21 @@ module.exports = function (grunt) {
|
|||||||
'docs/assets/js/jszip.js',
|
'docs/assets/js/jszip.js',
|
||||||
'docs/assets/js/uglify.js',
|
'docs/assets/js/uglify.js',
|
||||||
'docs/assets/js/filesaver.js',
|
'docs/assets/js/filesaver.js',
|
||||||
|
'docs/assets/js/raw-files.js',
|
||||||
'docs/assets/js/customizer.js'
|
'docs/assets/js/customizer.js'
|
||||||
],
|
],
|
||||||
dest: 'docs/assets/js/customize.min.js'
|
dest: 'docs/assets/js/customize.min.js'
|
||||||
|
},
|
||||||
|
docsJs: {
|
||||||
|
options: {
|
||||||
|
banner: '<%= bannerDocs %>',
|
||||||
|
report: 'min'
|
||||||
|
},
|
||||||
|
src: [
|
||||||
|
'docs/assets/js/holder.js',
|
||||||
|
'docs/assets/js/application.js'
|
||||||
|
],
|
||||||
|
dest: 'docs/assets/js/docs.min.js'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -177,6 +190,23 @@ module.exports = function (grunt) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
cssmin: {
|
||||||
|
compress: {
|
||||||
|
options: {
|
||||||
|
banner: '<%= bannerDocs %>',
|
||||||
|
keepSpecialComments: '*',
|
||||||
|
noAdvanced: true, // turn advanced optimizations off until it's fixed in clean-css
|
||||||
|
report: 'min',
|
||||||
|
selectorsMergeMode: 'ie8'
|
||||||
|
},
|
||||||
|
src: [
|
||||||
|
'docs/assets/css/docs.css',
|
||||||
|
'docs/assets/css/pygments-manni.css'
|
||||||
|
],
|
||||||
|
dest: 'docs/assets/css/pack.min.css'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
usebanner: {
|
usebanner: {
|
||||||
dist: {
|
dist: {
|
||||||
options: {
|
options: {
|
||||||
@@ -345,7 +375,7 @@ module.exports = function (grunt) {
|
|||||||
grunt.registerTask('dist-js', ['concat', 'uglify']);
|
grunt.registerTask('dist-js', ['concat', 'uglify']);
|
||||||
|
|
||||||
// CSS distribution task.
|
// CSS distribution task.
|
||||||
grunt.registerTask('dist-css', ['less', 'csscomb', 'usebanner']);
|
grunt.registerTask('dist-css', ['less', 'cssmin', 'csscomb', 'usebanner']);
|
||||||
|
|
||||||
// Docs distribution task.
|
// Docs distribution task.
|
||||||
grunt.registerTask('dist-docs', ['copy:docs']);
|
grunt.registerTask('dist-docs', ['copy:docs']);
|
||||||
|
2
dist/js/bootstrap.js
vendored
2
dist/js/bootstrap.js
vendored
@@ -4,7 +4,7 @@
|
|||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }
|
if (typeof jQuery === 'undefined') { throw new Error('Bootstrap requires jQuery') }
|
||||||
|
|
||||||
/* ========================================================================
|
/* ========================================================================
|
||||||
* Bootstrap: transition.js v3.0.3
|
* Bootstrap: transition.js v3.0.3
|
||||||
|
1
dist/js/bootstrap.min.js
vendored
1
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -3,12 +3,8 @@
|
|||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
<script src="{{ site.baseurl }}dist/js/bootstrap.min.js"></script>
|
<script src="{{ site.baseurl }}dist/js/bootstrap.min.js"></script>
|
||||||
|
<script src="{{ site.baseurl }}assets/js/docs.min.js"></script>
|
||||||
<script src="{{ site.baseurl }}assets/js/holder.js"></script>
|
|
||||||
<script src="{{ site.baseurl }}assets/js/application.js"></script>
|
|
||||||
|
|
||||||
{% if page.slug == "customize" %}
|
{% if page.slug == "customize" %}
|
||||||
<script src="{{ site.baseurl }}assets/js/raw-files.js"></script>
|
|
||||||
<script src="{{ site.baseurl }}assets/js/customize.min.js"></script>
|
<script src="{{ site.baseurl }}assets/js/customize.min.js"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@@ -17,8 +17,7 @@
|
|||||||
<link href="{{ site.baseurl }}dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="{{ site.baseurl }}dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Documentation extras -->
|
<!-- Documentation extras -->
|
||||||
<link href="{{ site.baseurl }}assets/css/docs.css" rel="stylesheet">
|
<link href="{{ site.baseurl }}assets/css/pack.min.css" rel="stylesheet">
|
||||||
<link href="{{ site.baseurl }}assets/css/pygments-manni.css" rel="stylesheet">
|
|
||||||
<!--[if lt IE 9]><script src="{{ site.baseurl }}assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
<!--[if lt IE 9]><script src="{{ site.baseurl }}assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||||
|
|
||||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
|
13
docs/assets/css/pack.min.css
vendored
Normal file
13
docs/assets/css/pack.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
4
docs/assets/js/customize.min.js
vendored
4
docs/assets/js/customize.min.js
vendored
File diff suppressed because one or more lines are too long
7
docs/assets/js/docs.min.js
vendored
Normal file
7
docs/assets/js/docs.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -33,6 +33,7 @@
|
|||||||
"grunt-contrib-connect": "~0.6.0",
|
"grunt-contrib-connect": "~0.6.0",
|
||||||
"grunt-contrib-copy": "~0.5.0",
|
"grunt-contrib-copy": "~0.5.0",
|
||||||
"grunt-contrib-csslint": "~0.2.0",
|
"grunt-contrib-csslint": "~0.2.0",
|
||||||
|
"grunt-contrib-cssmin": "~0.7.0",
|
||||||
"grunt-contrib-jade": "~0.9.1",
|
"grunt-contrib-jade": "~0.9.1",
|
||||||
"grunt-contrib-jshint": "~0.8.0",
|
"grunt-contrib-jshint": "~0.8.0",
|
||||||
"grunt-contrib-less": "~0.9.0",
|
"grunt-contrib-less": "~0.9.0",
|
||||||
|
Reference in New Issue
Block a user