From b56a03244423a51177df3865cf1b6780f74e23df Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Wed, 22 Jul 2015 07:13:57 -0400 Subject: [PATCH 1/3] Build: Must run variables task as part of the build --- tasks/alias.js | 2 +- tasks/variables.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/alias.js b/tasks/alias.js index 0b1fe20..30a04c6 100644 --- a/tasks/alias.js +++ b/tasks/alias.js @@ -1,7 +1,7 @@ module.exports = function( grunt ) { grunt.registerTask( "default", [ "test" ] ); grunt.registerTask( "test", [ "build", "jshint", "jscs", "csslint" ] ); -grunt.registerTask( "build", [ "svg", "sass", "csscomb", "cssmin" ] ); +grunt.registerTask( "build", [ "variables", "svg", "sass", "csscomb", "cssmin" ] ); grunt.registerTask( "perf", [ "start-selenium-server", "connect:perf", diff --git a/tasks/variables.js b/tasks/variables.js index 5ba72e8..ef1f4c5 100644 --- a/tasks/variables.js +++ b/tasks/variables.js @@ -1,5 +1,5 @@ module.exports = function( grunt ) { - grunt.registerTask( "buildVariables", function() { + grunt.registerTask( "variables", function() { var jsass = require( "jsass-vars" ); var path = require( "path" ); var varPath = path.join( process.cwd(), "scss/variables/*" ); From df28d52496f4c745bda89db74dc213d9b7fb1947 Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Tue, 28 Jul 2015 13:35:20 -0400 Subject: [PATCH 2/3] Build: load-grunt-config does not load perfjankie Workaround by manually loading --- tasks/options/perfjankie.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tasks/options/perfjankie.js b/tasks/options/perfjankie.js index 6f44de5..e09bd08 100644 --- a/tasks/options/perfjankie.js +++ b/tasks/options/perfjankie.js @@ -1,4 +1,7 @@ -module.exports = { +module.exports = function( grunt ) { +grunt.loadNpmTasks( "perfjankie" ); + +return { options: { suite: "perfSlides - Performance Analysis" }, @@ -40,4 +43,5 @@ module.exports = { ] } } -} +}; +}; From 94c9b2308124e9575a21eb18faf394b8305cae3a Mon Sep 17 00:00:00 2001 From: Rohit Mulange Date: Thu, 30 Jul 2015 13:35:18 +0530 Subject: [PATCH 3/3] Build: create dist directory if not exists --- tasks/variables.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tasks/variables.js b/tasks/variables.js index ef1f4c5..36847ba 100644 --- a/tasks/variables.js +++ b/tasks/variables.js @@ -3,10 +3,11 @@ module.exports = function( grunt ) { var jsass = require( "jsass-vars" ); var path = require( "path" ); var varPath = path.join( process.cwd(), "scss/variables/*" ); - + var distPath = path.join( process.cwd(), "dist" ); + grunt.file.mkdir( distPath ); jsass( varPath, { - "dest": path.join( process.cwd(), "dist" ), + "dest": distPath, "name": "chassis" } ); } ) -}; \ No newline at end of file +};