]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
add test-scss Grunt task
authorChris Rebert <code@rebertia.com>
Tue, 9 Dec 2014 03:02:25 +0000 (19:02 -0800)
committerChris Rebert <code@rebertia.com>
Tue, 9 Dec 2014 03:02:25 +0000 (19:02 -0800)
.gitignore
Gruntfile.js

index b3bcd969e1f5aa29d40553229bb30bb85619f4d2..d60e71a5fda5edebe58f2fa8895ca89d0e6550d9 100644 (file)
@@ -38,6 +38,9 @@ Thumbs.db
 validation-report.json
 validation-status.json
 
+# SCSS-Lint
+scss-lint-report.xml
+
 # Folders to ignore
 bower_components
 node_modules
index 1e386a1543af1125cf15ed8ebe71ade1f437bc72..5c14306e1ae5eec9fa7354907d9c739bf88fa417 100644 (file)
@@ -167,6 +167,14 @@ module.exports = function (grunt) {
       }
     },
 
+    scsslint: {
+      scss: ['scss/*.scss', '!scss/_normalize.scss'],
+      options: {
+        config: 'scss/.scss-lint.yml',
+        reporterOutput: 'scss-lint-report.xml'
+      }
+    },
+
     autoprefixer: {
       options: {
         browsers: configBridge.config.autoprefixerBrowsers
@@ -369,7 +377,7 @@ module.exports = function (grunt) {
   // Skip core tests if running a different subset of the test suite
   if (runSubset('core') &&
     // Skip core tests if this is a Savage build
-    process.env.TRAVIS_REPO_SLUG !== 'twbs-savage/bootstrap') {    testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'test-js', 'docs']);
+    process.env.TRAVIS_REPO_SLUG !== 'twbs-savage/bootstrap') {    testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'test-scss', 'test-js', 'docs']);
   }
   // Skip HTML validation if running a different subset of the test suite
   if (runSubset('validate-html') &&
@@ -392,6 +400,8 @@ module.exports = function (grunt) {
   // JS distribution task.
   grunt.registerTask('dist-js', ['concat', 'uglify:core', 'commonjs']);
 
+  grunt.registerTask('test-scss', ['scsslint:scss']);
+
   // CSS distribution task.
   grunt.registerTask('sass-compile', ['sass:core', 'sass:docs']);
   grunt.registerTask('dist-css', ['sass-compile', 'autoprefixer:core', 'usebanner', 'csscomb:dist', 'cssmin:core', 'cssmin:docs']);