From ebf780798578ecaa15467e2d3af249abefe80709 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 11 Dec 2013 00:29:42 +0200 Subject: docs-assets: concatenate and minify all javascript files. --- Gruntfile.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index bd67ce84d..0ac34deac 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -125,9 +125,20 @@ module.exports = function (grunt) { 'docs/assets/js/jszip.js', 'docs/assets/js/uglify.js', 'docs/assets/js/filesaver.js', + 'docs/assets/js/raw-files.js', 'docs/assets/js/customizer.js' ], dest: 'docs/assets/js/customize.min.js' + }, + docsJs: { + options: { + report: 'min' + }, + src: [ + 'docs/assets/js/holder.js', + 'docs/assets/js/application.js' + ], + dest: 'docs/assets/js/docs.min.js' } }, -- cgit v1.2.3 From f00bbdd994362a93a66a986c22846b25f11f8dc6 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 22 Dec 2013 09:25:18 +0200 Subject: Minify docs CSS too. --- Gruntfile.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 0ac34deac..db76ac565 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -179,6 +179,21 @@ module.exports = function (grunt) { } }, + cssmin: { + compress: { + options: { + keepSpecialComments: '*', + report: 'min', + selectorsMergeMode: 'ie8' + }, + src: [ + 'docs/assets/css/docs.css', + 'docs/assets/css/pygments-manni.css' + ], + dest: 'docs/assets/css/pack.min.css' + } + }, + usebanner: { dist: { options: { @@ -330,7 +345,7 @@ module.exports = function (grunt) { grunt.registerTask('dist-js', ['concat', 'uglify']); // CSS distribution task. - grunt.registerTask('dist-css', ['less', 'csscomb', 'usebanner']); + grunt.registerTask('dist-css', ['less', 'cssmin', 'csscomb', 'usebanner']); // Docs distribution task. grunt.registerTask('dist-docs', ['copy:docs']); -- cgit v1.2.3 From 9b71314fd8c5ae420b338e4719a4a86bf758a2cc Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 27 Dec 2013 06:01:56 +0200 Subject: Turn advanced optimizations off until it's fixed in clean-css. --- Gruntfile.js | 1 + 1 file changed, 1 insertion(+) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index db76ac565..e68d823bd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -183,6 +183,7 @@ module.exports = function (grunt) { compress: { options: { keepSpecialComments: '*', + noAdvanced: true, // turn advanced optimizations off until it's fixed in clean-css report: 'min', selectorsMergeMode: 'ie8' }, -- cgit v1.2.3 From 016d573a80c1cadea15e5c588a170d2e5101c86f Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 27 Dec 2013 06:14:28 +0200 Subject: Use the docs banner for all the docs generated files. --- Gruntfile.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index e68d823bd..33ce10777 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -23,6 +23,12 @@ module.exports = function (grunt) { ' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + ' * Licensed under <%= _.pluck(pkg.licenses, "type") %> (<%= _.pluck(pkg.licenses, "url") %>)\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. @@ -112,12 +118,7 @@ module.exports = function (grunt) { }, customize: { options: { - banner: '/*!\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', + banner: '<%= bannerDocs %>\n', report: 'min' }, src: [ @@ -132,6 +133,7 @@ module.exports = function (grunt) { }, docsJs: { options: { + banner: '<%= bannerDocs %>\n', report: 'min' }, src: [ @@ -182,6 +184,7 @@ module.exports = function (grunt) { cssmin: { compress: { options: { + banner: '<%= bannerDocs %>\n', keepSpecialComments: '*', noAdvanced: true, // turn advanced optimizations off until it's fixed in clean-css report: 'min', -- cgit v1.2.3 From d7bf9372ec56a58686797da769d22b584fa64574 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 30 Dec 2013 08:25:52 +0200 Subject: Remove extra newline from banner. --- Gruntfile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 33ce10777..c7599c8b5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -110,7 +110,7 @@ module.exports = function (grunt) { uglify: { bootstrap: { options: { - banner: '<%= banner %>\n', + banner: '<%= banner %>', report: 'min' }, src: ['<%= concat.bootstrap.dest %>'], @@ -118,7 +118,7 @@ module.exports = function (grunt) { }, customize: { options: { - banner: '<%= bannerDocs %>\n', + banner: '<%= bannerDocs %>', report: 'min' }, src: [ @@ -133,7 +133,7 @@ module.exports = function (grunt) { }, docsJs: { options: { - banner: '<%= bannerDocs %>\n', + banner: '<%= bannerDocs %>', report: 'min' }, src: [ @@ -184,7 +184,7 @@ module.exports = function (grunt) { cssmin: { compress: { options: { - banner: '<%= bannerDocs %>\n', + banner: '<%= bannerDocs %>', keepSpecialComments: '*', noAdvanced: true, // turn advanced optimizations off until it's fixed in clean-css report: 'min', -- cgit v1.2.3 From d06d61dc127c62a7f121de6c90498ce326db4b03 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 27 Dec 2013 06:08:40 +0200 Subject: Use single quotes in the jqueryCheck too. --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index c7599c8b5..2fee5356f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -29,7 +29,7 @@ module.exports = function (grunt) { ' * 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', + jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Bootstrap requires jQuery\') }\n\n', // Task configuration. clean: { -- cgit v1.2.3