From 146cd38867f6bec01868a8605d303426547e8680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Sat, 5 Oct 2013 21:17:49 +0200 Subject: Sort tasks alphabetically --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 4edad59ae..32418e8e4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -156,6 +156,7 @@ module.exports = function(grunt) { // These plugins provide necessary tasks. + grunt.loadNpmTasks('browserstack-runner'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-connect'); @@ -167,7 +168,6 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-html-validation'); grunt.loadNpmTasks('grunt-jekyll'); grunt.loadNpmTasks('grunt-recess'); - grunt.loadNpmTasks('browserstack-runner'); // Docs HTML validation task grunt.registerTask('validate-html', ['jekyll', 'validation']); -- cgit v1.2.3 From aad70834fc2546d5e877898098707930a7d7a4c3 Mon Sep 17 00:00:00 2001 From: herom Date: Wed, 21 Aug 2013 14:16:45 +0430 Subject: Fixes #9925: convert font data to base64, fixing 0xefbfbd (Unicode Replacement Character) chars in customizer fonts. Merges #9982 --- Gruntfile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 4edad59ae..4242bb7bd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,6 +3,7 @@ module.exports = function(grunt) { "use strict"; + var btoa = require('btoa') // Project configuration. grunt.initConfig({ @@ -209,7 +210,8 @@ module.exports = function(grunt) { return type == 'fonts' ? true : new RegExp('\\.' + type + '$').test(path) }) .forEach(function (path) { - return files[path] = fs.readFileSync(type + '/' + path, 'utf8') + return type == 'fonts' ? files[path] = btoa(fs.readFileSync(type + '/' + path)) : + files[path] = fs.readFileSync(type + '/' + path, 'utf8') }) return 'var __' + type + ' = ' + JSON.stringify(files) + '\n' } -- cgit v1.2.3 From f9ed8e6f003d60e50873976a6573eb0faa3c26c9 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 9 Oct 2013 17:57:52 -0700 Subject: trivial refactor in build-customizer grunt task --- Gruntfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 4242bb7bd..6d33703c8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -210,8 +210,8 @@ module.exports = function(grunt) { return type == 'fonts' ? true : new RegExp('\\.' + type + '$').test(path) }) .forEach(function (path) { - return type == 'fonts' ? files[path] = btoa(fs.readFileSync(type + '/' + path)) : - files[path] = fs.readFileSync(type + '/' + path, 'utf8') + var fullPath = type + '/' + path + return files[path] = (type == 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8')) }) return 'var __' + type + ' = ' + JSON.stringify(files) + '\n' } -- cgit v1.2.3 From 0d122fc3230663cadfef7474bbf54aa297334c72 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 23 Oct 2013 23:25:17 -0700 Subject: silence validator regarding http-equiv="X-UA-Compatible" --- Gruntfile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 41f7ed331..e4f00bdb4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -132,7 +132,10 @@ module.exports = function(grunt) { validation: { options: { - reset: true + reset: true, + relaxerror: [ + "Bad value X-UA-Compatible for attribute http-equiv on element meta." + ] }, files: { src: ["_gh_pages/**/*.html"] -- cgit v1.2.3 From 54cd0f8c2f1aaadefd8447f9ff4cd9bb04fe4e72 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 23 Oct 2013 23:41:17 -0700 Subject: rm dummy 'src' attributes of s & squelch validator warning; fixes #11216 --- Gruntfile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index e4f00bdb4..9b167e8f0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -134,7 +134,8 @@ module.exports = function(grunt) { options: { reset: true, relaxerror: [ - "Bad value X-UA-Compatible for attribute http-equiv on element meta." + "Bad value X-UA-Compatible for attribute http-equiv on element meta.", + "Element img is missing required attribute src." ] }, files: { -- cgit v1.2.3 From 20cba845c26b04799de7a7a6d9554e9fd6d21eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Thu, 24 Oct 2013 19:32:41 +0200 Subject: Add another newline to improve final code readability This divides banner from code. --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 9b167e8f0..97f4ec4c0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,7 +15,7 @@ module.exports = function(grunt) { ' * Licensed under <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' + ' *\n' + ' * Designed and built with all the love in the world by @mdo and @fat.\n' + - ' */\n', + ' */\n\n', jqueryCheck: 'if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }\n\n', // Task configuration. -- cgit v1.2.3 From 0bb122a377bc2c809a7ce64fb740ee9620b4b72e Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Fri, 1 Nov 2013 18:15:25 -0700 Subject: add Grunt task to change version numbers; fixes #11332 --- Gruntfile.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 97f4ec4c0..c3016a2b0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,6 +3,7 @@ module.exports = function(grunt) { "use strict"; + RegExp.quote = require('regexp-quote') var btoa = require('btoa') // Project configuration. grunt.initConfig({ @@ -156,6 +157,17 @@ module.exports = function(grunt) { files: 'less/*.less', tasks: ['recess'] } + }, + + sed: { + versionNumber: { + pattern: (function () { + var old = grunt.option('oldver') + return old ? RegExp.quote(old) : old + })(), + replacement: grunt.option('newver'), + recursive: true + } } }); @@ -173,6 +185,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-html-validation'); grunt.loadNpmTasks('grunt-jekyll'); grunt.loadNpmTasks('grunt-recess'); + grunt.loadNpmTasks('grunt-sed'); // Docs HTML validation task grunt.registerTask('validate-html', ['jekyll', 'validation']); @@ -203,6 +216,11 @@ module.exports = function(grunt) { // Default task. grunt.registerTask('default', ['test', 'dist', 'build-customizer']); + // Version numbering task. + // grunt change-version-number --oldver=A.B.C --newver=X.Y.Z + // This can be overzealous, so its changes should always be manually reviewed! + grunt.registerTask('change-version-number', ['sed']); + // task for building customizer grunt.registerTask('build-customizer', 'Add scripts/less files to customizer.', function () { var fs = require('fs') -- cgit v1.2.3 From 9a8a571ad1517f9a622e5db52808fd0f905ecf16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Sun, 17 Nov 2013 10:24:31 +0100 Subject: Fix some weird indents --- Gruntfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index c3016a2b0..ebc3abc38 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -135,8 +135,8 @@ module.exports = function(grunt) { options: { reset: true, relaxerror: [ - "Bad value X-UA-Compatible for attribute http-equiv on element meta.", - "Element img is missing required attribute src." + "Bad value X-UA-Compatible for attribute http-equiv on element meta.", + "Element img is missing required attribute src." ] }, files: { -- cgit v1.2.3 From a7a9dcaeb2231b2580cf79fcee7d777b98ac24d8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 30 Nov 2013 00:42:36 -0800 Subject: Alternate fix for #11303: add link to site in banner and remove @mdo and @fat usernames from it --- Gruntfile.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index ebc3abc38..beacc3cc8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -11,11 +11,9 @@ module.exports = function(grunt) { // Metadata. pkg: grunt.file.readJSON('package.json'), banner: '/*!\n' + - ' * Bootstrap v<%= pkg.version %> by @fat and @mdo\n' + + ' * Bootstrap v<%= pkg.version %> (http://getbootstrap.com)\n' + ' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + ' * Licensed under <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' + - ' *\n' + - ' * Designed and built with all the love in the world by @mdo and @fat.\n' + ' */\n\n', jqueryCheck: 'if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }\n\n', -- cgit v1.2.3 From ab87085625189282b9f6357e50416a21a532b790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Sat, 30 Nov 2013 16:11:41 +0100 Subject: Use pkg.homepage --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index beacc3cc8..c0e47d239 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -11,7 +11,7 @@ module.exports = function(grunt) { // Metadata. pkg: grunt.file.readJSON('package.json'), banner: '/*!\n' + - ' * Bootstrap v<%= pkg.version %> (http://getbootstrap.com)\n' + + ' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' + ' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + ' * Licensed under <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' + ' */\n\n', -- cgit v1.2.3 From 5a826a65b29f5c89a0c60bede111be7992027a0a Mon Sep 17 00:00:00 2001 From: Tobias Lindig Date: Tue, 3 Dec 2013 12:07:57 +0100 Subject: Gruntfile.js: Set line feed char to '\n' to get same result on all platforms. --- Gruntfile.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index c0e47d239..d4b2fdd0b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,6 +3,9 @@ module.exports = function(grunt) { "use strict"; + // Force use of Unix newlines + grunt.util.linefeed = '\n'; + RegExp.quote = require('regexp-quote') var btoa = require('btoa') // Project configuration. -- cgit v1.2.3 From bd9332a58a9c75d831a1dc877ddfc9b846ef1344 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 3 Dec 2013 18:42:31 -0800 Subject: switch to Sauce Labs for our cross-browser JS unit testing needs Fixes #11087 --- Gruntfile.js | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 99 insertions(+), 7 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index d4b2fdd0b..77477596d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -169,12 +169,105 @@ module.exports = function(grunt) { replacement: grunt.option('newver'), recursive: true } + }, + + 'saucelabs-qunit': { + all: { + options: { + build: process.env.TRAVIS_JOB_ID, + concurrency: 3, + urls: ['http://127.0.0.1:3000/js/tests/index.html'], + browsers: [ + // See https://saucelabs.com/docs/platforms/webdriver + { + browserName: 'safari', + version: '6', + platform: 'OS X 10.8' + }, + { + browserName: 'chrome', + version: '28', + platform: 'OS X 10.6' + }, + /* FIXME: currently fails 1 tooltip test + { + browserName: 'firefox', + version: '25', + platform: 'OS X 10.6' + },*/ + // Mac Opera not currently supported by Sauce Labs + /* FIXME: currently fails 1 tooltip test + { + browserName: 'internet explorer', + version: '11', + platform: 'Windows 8.1' + },*/ + /* + { + browserName: 'internet explorer', + version: '10', + platform: 'Windows 8' + }, + { + browserName: 'internet explorer', + version: '9', + platform: 'Windows 7' + }, + { + browserName: 'internet explorer', + version: '8', + platform: 'Windows 7' + }, + {// unofficial + browserName: 'internet explorer', + version: '7', + platform: 'Windows XP' + }, + */ + { + browserName: 'chrome', + version: '31', + platform: 'Windows 8.1' + }, + { + browserName: 'firefox', + version: '25', + platform: 'Windows 8.1' + }, + // Win Opera 15+ not currently supported by Sauce Labs + { + browserName: 'iphone', + version: '6.1', + platform: 'OS X 10.8' + }, + // iOS Chrome not currently supported by Sauce Labs + // Linux (unofficial) + { + browserName: 'chrome', + version: '30', + platform: 'Linux' + }, + { + browserName: 'firefox', + version: '25', + platform: 'Linux' + } + // Android Chrome not currently supported by Sauce Labs + /* Android Browser (super-unofficial) + { + browserName: 'android', + version: '4.0', + platform: 'Linux' + } + */ + ], + } + } } }); // These plugins provide necessary tasks. - grunt.loadNpmTasks('browserstack-runner'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-connect'); @@ -186,6 +279,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-html-validation'); grunt.loadNpmTasks('grunt-jekyll'); grunt.loadNpmTasks('grunt-recess'); + grunt.loadNpmTasks('grunt-saucelabs'); grunt.loadNpmTasks('grunt-sed'); // Docs HTML validation task @@ -193,12 +287,10 @@ module.exports = function(grunt) { // Test task. var testSubtasks = ['dist-css', 'jshint', 'qunit', 'validate-html']; - // Only run BrowserStack tests under Travis - if (process.env.TRAVIS) { - // Only run BrowserStack tests if this is a mainline commit in twbs/bootstrap, or you have your own BrowserStack key - if ((process.env.TRAVIS_REPO_SLUG === 'twbs/bootstrap' && process.env.TRAVIS_PULL_REQUEST === 'false') || process.env.TWBS_HAVE_OWN_BROWSERSTACK_KEY) { - testSubtasks.push('browserstack_runner'); - } + // Only run Sauce Labs tests if there's a Sauce access key + if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined') { + testSubtasks.push('connect'); + testSubtasks.push('saucelabs-qunit'); } grunt.registerTask('test', testSubtasks); -- cgit v1.2.3 From 3de4f23ea210dd964748528503444bbaeed860ce Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 19 Sep 2013 17:41:14 +0300 Subject: Minify docs-assets too. --- Gruntfile.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 77477596d..c60e600ab 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -72,6 +72,16 @@ module.exports = function(grunt) { bootstrap: { src: ['<%= concat.bootstrap.dest %>'], dest: 'dist/js/<%= pkg.name %>.min.js' + }, + customize: { + src: [ + 'docs-assets/js/less.js', + 'docs-assets/js/jszip.js', + 'docs-assets/js/uglify.js', + 'docs-assets/js/filesaver.js', + 'docs-assets/js/customizer.js' + ], + dest: 'docs-assets/js/customize.js' } }, -- cgit v1.2.3 From 351f86e1db6bbb5f37e67323094fc08f4aeceecd Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Fri, 6 Dec 2013 16:51:59 -0800 Subject: fix some JS to pass jscs --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index c60e600ab..9c8cc854b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,6 +1,6 @@ /* jshint node: true */ -module.exports = function(grunt) { +module.exports = function (grunt) { "use strict"; // Force use of Unix newlines -- cgit v1.2.3 From c1dae1e13c0dd5c53aa39b6aa6af8e07e4d3037f Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Fri, 6 Dec 2013 16:51:38 -0800 Subject: integrate JSCS --- Gruntfile.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 9c8cc854b..4e713d7c8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -40,6 +40,21 @@ module.exports = function (grunt) { } }, + jscs: { + options: { + config: 'js/.jscs.json', + }, + gruntfile: { + src: ['Gruntfile.js'] + }, + src: { + src: ['js/*.js'] + }, + test: { + src: ['js/tests/unit/*.js'] + } + }, + concat: { options: { banner: '<%= banner %><%= jqueryCheck %>', @@ -288,6 +303,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-html-validation'); grunt.loadNpmTasks('grunt-jekyll'); + grunt.loadNpmTasks('grunt-jscs-checker'); grunt.loadNpmTasks('grunt-recess'); grunt.loadNpmTasks('grunt-saucelabs'); grunt.loadNpmTasks('grunt-sed'); @@ -296,7 +312,7 @@ module.exports = function (grunt) { grunt.registerTask('validate-html', ['jekyll', 'validation']); // Test task. - var testSubtasks = ['dist-css', 'jshint', 'qunit', 'validate-html']; + var testSubtasks = ['dist-css', 'jshint', 'jscs', 'qunit', 'validate-html']; // Only run Sauce Labs tests if there's a Sauce access key if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined') { testSubtasks.push('connect'); -- cgit v1.2.3 From 2fc2fe75bdfaa8c22929594d4846dfad6aab71c7 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 18 Sep 2013 21:37:55 +0300 Subject: Lint docs-assets/js/application.js and docs-assets/js/customizer.js. --- Gruntfile.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index c60e600ab..1532e0aed 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -37,6 +37,9 @@ module.exports = function(grunt) { }, test: { src: ['js/tests/unit/*.js'] + }, + assets: { + src: ['docs-assets/js/application.js', 'docs-assets/js/customizer.js'] } }, -- cgit v1.2.3 From eca8ff380388c1187bc2c86e0ae7fa80aa33111e Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 18 Sep 2013 19:50:02 +0300 Subject: Use single quotes consistently. --- Gruntfile.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 3eaaacee9..f7da24f8b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,7 +1,7 @@ /* jshint node: true */ module.exports = function (grunt) { - "use strict"; + 'use strict'; // Force use of Unix newlines grunt.util.linefeed = '\n'; @@ -135,7 +135,7 @@ module.exports = function (grunt) { copy: { fonts: { expand: true, - src: ["fonts/*"], + src: ['fonts/*'], dest: 'dist/' } }, @@ -164,12 +164,12 @@ module.exports = function (grunt) { options: { reset: true, relaxerror: [ - "Bad value X-UA-Compatible for attribute http-equiv on element meta.", - "Element img is missing required attribute src." + 'Bad value X-UA-Compatible for attribute http-equiv on element meta.', + 'Element img is missing required attribute src.' ] }, files: { - src: ["_gh_pages/**/*.html"] + src: ['_gh_pages/**/*.html'] } }, -- cgit v1.2.3 From fdc5d1dc34bf28e55c6359aeb098e608585ca6cb Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 18 Sep 2013 08:45:38 +0300 Subject: Minify css with clean-css. --- Gruntfile.js | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index f7da24f8b..721c81982 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -82,6 +82,21 @@ module.exports = function (grunt) { } }, + cssmin: { + compress: { + options: { + banner: '<%= banner %>', + keepSpecialComments: 0, + report: 'min', + selectorsMergeMode: 'ie8' + }, + files: { + 'dist/css/<%= pkg.name %>.min.css': '<%= recess.bootstrap.dest %>', + 'dist/css/<%= pkg.name %>-theme.min.css': '<%= recess.theme.dest %>' + } + } + }, + uglify: { options: { banner: '<%= banner %>', @@ -112,23 +127,9 @@ module.exports = function (grunt) { src: ['less/bootstrap.less'], dest: 'dist/css/<%= pkg.name %>.css' }, - min: { - options: { - compress: true - }, - src: ['less/bootstrap.less'], - dest: 'dist/css/<%= pkg.name %>.min.css' - }, theme: { src: ['less/theme.less'], dest: 'dist/css/<%= pkg.name %>-theme.css' - }, - theme_min: { - options: { - compress: true - }, - src: ['less/theme.less'], - dest: 'dist/css/<%= pkg.name %>-theme.min.css' } }, @@ -300,6 +301,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-uglify'); @@ -327,7 +329,7 @@ module.exports = function (grunt) { grunt.registerTask('dist-js', ['concat', 'uglify']); // CSS distribution task. - grunt.registerTask('dist-css', ['recess']); + grunt.registerTask('dist-css', ['recess', 'cssmin']); // Fonts distribution task. grunt.registerTask('dist-fonts', ['copy']); -- cgit v1.2.3 From cbfbf1b2dd16b1aa17e3feef9a4643e98a0f967e Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 8 Dec 2013 13:01:18 +0200 Subject: Add csslint support. --- Gruntfile.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index f7da24f8b..c7277cb98 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -58,6 +58,13 @@ module.exports = function (grunt) { } }, + csslint: { + options: { + csslintrc: '.csslintrc' + }, + src: ['dist/css/bootstrap.css', 'dist/css/bootstrap-theme.css'] + }, + concat: { options: { banner: '<%= banner %><%= jqueryCheck %>', @@ -300,6 +307,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-contrib-csslint'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-uglify'); -- cgit v1.2.3 From c0200426ee72b165de400db740a60bae5d344b3c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 Dec 2013 19:09:27 -0800 Subject: Drop grunt-recess for grunt-contrib-less & co --- Gruntfile.js | 82 +++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 23 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index f7da24f8b..1f3cf8d28 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -103,32 +103,65 @@ module.exports = function (grunt) { } }, - recess: { - options: { - compile: true, - banner: '<%= banner %>' - }, - bootstrap: { - src: ['less/bootstrap.less'], - dest: 'dist/css/<%= pkg.name %>.css' + less: { + compile: { + files: { + 'dist/css/<%= pkg.name %>.css': 'less/bootstrap.less', + 'dist/css/<%= pkg.name %>-theme.css': 'less/theme.less' + } }, - min: { + minify: { options: { compress: true }, - src: ['less/bootstrap.less'], - dest: 'dist/css/<%= pkg.name %>.min.css' - }, - theme: { - src: ['less/theme.less'], - dest: 'dist/css/<%= pkg.name %>-theme.css' + files: { + 'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css', + 'dist/css/<%= pkg.name %>-theme.min.css': 'dist/css/<%= pkg.name %>-theme.css' + } + } + }, + + csscomb: { + options: { + // sortOrder: '/.csscomb.json', + "always-semicolon": true, + "block-indent": true, + "colon-space": true, + "color-case": "lower", + "color-shorthand": true, + "combinator-space": true, + "element-case": "lower", + "eof-newline": true, + "leading-zero": false, + "remove-empty-rulesets": true, + "rule-indent": true, + "stick-brace": "\n", + "strip-spaces": true, + "unitless-zero": true, + "vendor-prefix-align": true }, - theme_min: { + files: { + 'dist/css/<%= pkg.name %>.sorted.css': ['dist/css/<%= pkg.name %>.css'], + 'dist/css/<%= pkg.name %>.min.sorted.css': ['dist/css/<%= pkg.name %>.min.css'], + 'dist/css/<%= pkg.name %>-theme.sorted.css': ['dist/css/<%= pkg.name %>-theme.css'], + 'dist/css/<%= pkg.name %>-theme.min.sorted.css': ['dist/css/<%= pkg.name %>-theme.min.css'] + } + }, + + usebanner: { + dist: { options: { - compress: true + position: 'top', + banner: '<%= banner %>' }, - src: ['less/theme.less'], - dest: 'dist/css/<%= pkg.name %>-theme.min.css' + files: { + src: [ + 'dist/css/<%= pkg.name %>.css', + 'dist/css/<%= pkg.name %>.min.css', + 'dist/css/<%= pkg.name %>-theme.css', + 'dist/css/<%= pkg.name %>-theme.min.css', + ] + } } }, @@ -182,9 +215,9 @@ module.exports = function (grunt) { files: '<%= jshint.test.src %>', tasks: ['jshint:test', 'qunit'] }, - recess: { + less: { files: 'less/*.less', - tasks: ['recess'] + tasks: ['less'] } }, @@ -296,18 +329,21 @@ module.exports = function (grunt) { // These plugins provide necessary tasks. + grunt.loadNpmTasks('grunt-banner'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-csscomb'); grunt.loadNpmTasks('grunt-html-validation'); grunt.loadNpmTasks('grunt-jekyll'); grunt.loadNpmTasks('grunt-jscs-checker'); - grunt.loadNpmTasks('grunt-recess'); + // grunt.loadNpmTasks('grunt-recess'); grunt.loadNpmTasks('grunt-saucelabs'); grunt.loadNpmTasks('grunt-sed'); @@ -327,7 +363,7 @@ module.exports = function (grunt) { grunt.registerTask('dist-js', ['concat', 'uglify']); // CSS distribution task. - grunt.registerTask('dist-css', ['recess']); + grunt.registerTask('dist-css', ['less', 'csscomb', 'usebanner']); // Fonts distribution task. grunt.registerTask('dist-fonts', ['copy']); -- cgit v1.2.3 From f1cb57c8c2625089a2cdc4890897923cfaf02174 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 Dec 2013 19:12:37 -0800 Subject: restore original options value --- Gruntfile.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 1f3cf8d28..33e47bb79 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -123,22 +123,7 @@ module.exports = function (grunt) { csscomb: { options: { - // sortOrder: '/.csscomb.json', - "always-semicolon": true, - "block-indent": true, - "colon-space": true, - "color-case": "lower", - "color-shorthand": true, - "combinator-space": true, - "element-case": "lower", - "eof-newline": true, - "leading-zero": false, - "remove-empty-rulesets": true, - "rule-indent": true, - "stick-brace": "\n", - "strip-spaces": true, - "unitless-zero": true, - "vendor-prefix-align": true + sortOrder: '/.csscomb.json', }, files: { 'dist/css/<%= pkg.name %>.sorted.css': ['dist/css/<%= pkg.name %>.css'], -- cgit v1.2.3 From dbe95f027d7b0a97b3fade2621fdb939e5fb05af Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 8 Dec 2013 20:46:12 -0800 Subject: fixups to csscomb grunt task --- Gruntfile.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 33e47bb79..d7e362435 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -122,14 +122,16 @@ module.exports = function (grunt) { }, csscomb: { - options: { - sortOrder: '/.csscomb.json', - }, - files: { - 'dist/css/<%= pkg.name %>.sorted.css': ['dist/css/<%= pkg.name %>.css'], - 'dist/css/<%= pkg.name %>.min.sorted.css': ['dist/css/<%= pkg.name %>.min.css'], - 'dist/css/<%= pkg.name %>-theme.sorted.css': ['dist/css/<%= pkg.name %>-theme.css'], - 'dist/css/<%= pkg.name %>-theme.min.sorted.css': ['dist/css/<%= pkg.name %>-theme.min.css'] + sort: { + options: { + sortOrder: '.csscomb.json', + }, + files: { + 'dist/css/<%= pkg.name %>.sorted.css': ['dist/css/<%= pkg.name %>.css'], + 'dist/css/<%= pkg.name %>.min.sorted.css': ['dist/css/<%= pkg.name %>.min.css'], + 'dist/css/<%= pkg.name %>-theme.sorted.css': ['dist/css/<%= pkg.name %>-theme.css'], + 'dist/css/<%= pkg.name %>-theme.min.sorted.css': ['dist/css/<%= pkg.name %>-theme.min.css'] + } } }, @@ -328,7 +330,6 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-html-validation'); grunt.loadNpmTasks('grunt-jekyll'); grunt.loadNpmTasks('grunt-jscs-checker'); - // grunt.loadNpmTasks('grunt-recess'); grunt.loadNpmTasks('grunt-saucelabs'); grunt.loadNpmTasks('grunt-sed'); -- cgit v1.2.3 From aae9c2d1363c1c3f05ef09961ff49c8f040c7e84 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 Dec 2013 22:11:46 -0800 Subject: merge, compile --- Gruntfile.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index d7e362435..713843f74 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -112,7 +112,8 @@ module.exports = function (grunt) { }, minify: { options: { - compress: true + compress: true, + report: 'min' }, files: { 'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css', @@ -124,13 +125,13 @@ module.exports = function (grunt) { csscomb: { sort: { options: { - sortOrder: '.csscomb.json', + sortOrder: '.csscomb.json' }, files: { - 'dist/css/<%= pkg.name %>.sorted.css': ['dist/css/<%= pkg.name %>.css'], - 'dist/css/<%= pkg.name %>.min.sorted.css': ['dist/css/<%= pkg.name %>.min.css'], - 'dist/css/<%= pkg.name %>-theme.sorted.css': ['dist/css/<%= pkg.name %>-theme.css'], - 'dist/css/<%= pkg.name %>-theme.min.sorted.css': ['dist/css/<%= pkg.name %>-theme.min.css'] + 'dist/css/<%= pkg.name %>.css': ['dist/css/<%= pkg.name %>.css'], + 'dist/css/<%= pkg.name %>.min.css': ['dist/css/<%= pkg.name %>.min.css'], + 'dist/css/<%= pkg.name %>-theme.css': ['dist/css/<%= pkg.name %>-theme.css'], + 'dist/css/<%= pkg.name %>-theme.min.css': ['dist/css/<%= pkg.name %>-theme.min.css'] } } }, -- cgit v1.2.3 From 4540f9e2d26e4e5b4838dc55133110ef5eab2046 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 Dec 2013 22:16:43 -0800 Subject: derp, don't sort min /cc @cvrebert --- Gruntfile.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 713843f74..f07703efe 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -129,9 +129,7 @@ module.exports = function (grunt) { }, files: { 'dist/css/<%= pkg.name %>.css': ['dist/css/<%= pkg.name %>.css'], - 'dist/css/<%= pkg.name %>.min.css': ['dist/css/<%= pkg.name %>.min.css'], 'dist/css/<%= pkg.name %>-theme.css': ['dist/css/<%= pkg.name %>-theme.css'], - 'dist/css/<%= pkg.name %>-theme.min.css': ['dist/css/<%= pkg.name %>-theme.min.css'] } } }, -- cgit v1.2.3 From d466d527a496e14ef1c8fdbeb7a221bd3a239f09 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 9 Dec 2013 00:12:11 -0800 Subject: Undo merge of #11778 and use cleancss min option --- Gruntfile.js | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 36112c840..73023939e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -117,6 +117,16 @@ module.exports = function (grunt) { 'dist/css/<%= pkg.name %>-theme.css': 'less/theme.less' } }, + minify: { + options: { + cleancss: true, + report: 'min' + }, + files: { + 'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css', + 'dist/css/<%= pkg.name %>-theme.min.css': 'dist/css/<%= pkg.name %>-theme.css' + } + } }, usebanner: { @@ -128,26 +138,14 @@ module.exports = function (grunt) { files: { src: [ 'dist/css/<%= pkg.name %>.css', + 'dist/css/<%= pkg.name %>.min.css', 'dist/css/<%= pkg.name %>-theme.css', + 'dist/css/<%= pkg.name %>-theme.min.css', ] } } }, - cssmin: { - compress: { - options: { - keepSpecialComments: 1, - report: 'min', - selectorsMergeMode: 'ie8' - }, - files: { - 'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css', - 'dist/css/<%= pkg.name %>-theme.min.css': 'dist/css/<%= pkg.name %>-theme.css' - } - } - }, - csscomb: { sort: { options: { @@ -330,7 +328,6 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-csslint'); - grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-qunit'); @@ -359,7 +356,7 @@ module.exports = function (grunt) { grunt.registerTask('dist-js', ['concat', 'uglify']); // CSS distribution task. - grunt.registerTask('dist-css', ['less', 'cssmin', 'csscomb', 'usebanner']); + grunt.registerTask('dist-css', ['less', 'csscomb', 'usebanner']); // Fonts distribution task. grunt.registerTask('dist-fonts', ['copy']); -- cgit v1.2.3 From 95992ef7e93ed53b66b38cef67ea6dffaa6116ab Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 9 Dec 2013 16:06:35 -0800 Subject: enable strictMath in grunt-contrib-less config --- Gruntfile.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 73023939e..6b35cedc2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -112,6 +112,9 @@ module.exports = function (grunt) { less: { compile: { + options: { + strictMath: true + }, files: { 'dist/css/<%= pkg.name %>.css': 'less/bootstrap.less', 'dist/css/<%= pkg.name %>-theme.css': 'less/theme.less' -- cgit v1.2.3 From 9f12f840b94293392cb0da008d744107b952d149 Mon Sep 17 00:00:00 2001 From: Tobias Lindig Date: Tue, 10 Dec 2013 10:28:44 +0100 Subject: Buildprocess: use module "load-grunt-tasks" to load grunt tasks directly from the package.json --- Gruntfile.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 6b35cedc2..010dc58d7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -325,23 +325,7 @@ module.exports = function (grunt) { // These plugins provide necessary tasks. - grunt.loadNpmTasks('grunt-banner'); - grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-connect'); - grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.loadNpmTasks('grunt-contrib-csslint'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-less'); - grunt.loadNpmTasks('grunt-contrib-qunit'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-csscomb'); - grunt.loadNpmTasks('grunt-html-validation'); - grunt.loadNpmTasks('grunt-jekyll'); - grunt.loadNpmTasks('grunt-jscs-checker'); - grunt.loadNpmTasks('grunt-saucelabs'); - grunt.loadNpmTasks('grunt-sed'); + require('load-grunt-tasks')(grunt, {scope: 'devDependencies'}); // Docs HTML validation task grunt.registerTask('validate-html', ['jekyll', 'validation']); -- cgit v1.2.3 From 3583aa27749d863d2974d6494081ce42280c8fbb Mon Sep 17 00:00:00 2001 From: Tobias Lindig Date: Tue, 10 Dec 2013 14:47:50 +0100 Subject: correct indentation --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 010dc58d7..89e7f42f3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -325,7 +325,7 @@ module.exports = function (grunt) { // These plugins provide necessary tasks. - require('load-grunt-tasks')(grunt, {scope: 'devDependencies'}); + require('load-grunt-tasks')(grunt, {scope: 'devDependencies'}); // Docs HTML validation task grunt.registerTask('validate-html', ['jekyll', 'validation']); -- cgit v1.2.3 From 56d89ed7aea8939e08aa839c9774634e60c39793 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Thu, 12 Dec 2013 21:58:44 -0800 Subject: Sauce tests: update to later browsers supported by OS X 10.9 --- Gruntfile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 89e7f42f3..aae80dc3d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -238,13 +238,13 @@ module.exports = function (grunt) { // See https://saucelabs.com/docs/platforms/webdriver { browserName: 'safari', - version: '6', - platform: 'OS X 10.8' + version: '7', + platform: 'OS X 10.9' }, { browserName: 'chrome', - version: '28', - platform: 'OS X 10.6' + version: '31', + platform: 'OS X 10.9' }, /* FIXME: currently fails 1 tooltip test { -- cgit v1.2.3