From de49ef8d5bb16cee2336daaf9099b14286f67289 Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Thu, 31 Oct 2013 11:35:17 +0100 Subject: [PATCH] update codestyle --- tasks/datauri.js | 11 ++++++++--- test/datauri_test.js | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tasks/datauri.js b/tasks/datauri.js index faa007e..f520440 100644 --- a/tasks/datauri.js +++ b/tasks/datauri.js @@ -85,13 +85,18 @@ module.exports = function (grunt) function generateCss( filepath, data ) { var filetype = filepath.split( '.' ).pop().toLowerCase(); - var className, template; + var className; + var template; className = options.classPrefix + path.basename( data.path ).split( '.' )[0] + options.classSuffix; filetype = options.usePlaceholder ? filetype : filetype + '_no'; - if(options.variables) { + + if (options.variables) + { template = cssTemplates.variables; - } else { + } + else + { template = cssTemplates[ filetype ] || cssTemplates.default; } diff --git a/test/datauri_test.js b/test/datauri_test.js index f3c05c3..d5c62f4 100644 --- a/test/datauri_test.js +++ b/test/datauri_test.js @@ -23,14 +23,14 @@ exports.datauri = { test.done(); }, - variables_option: function( test) + variables_option: function( test ) { test.expect( 2 ); var file = grunt.file.read; - test.equal( file( "tmp/base64.variables.scss"), file( "test/expected/base64.variables.scss" ), "SCSS variables should be equal."); - test.equal( file( "tmp/base64.variables.sass"), file( "test/expected/base64.variables.sass" ), "SASS variables should be equal."); + test.equal( file( "tmp/base64.variables.scss" ), file( "test/expected/base64.variables.scss" ), "SCSS variables should be equal." ); + test.equal( file( "tmp/base64.variables.sass" ), file( "test/expected/base64.variables.sass" ), "SASS variables should be equal." ); test.done(); }