update codestyle
This commit is contained in:
+8
-3
@@ -85,13 +85,18 @@ module.exports = function (grunt)
|
|||||||
function generateCss( filepath, data )
|
function generateCss( filepath, data )
|
||||||
{
|
{
|
||||||
var filetype = filepath.split( '.' ).pop().toLowerCase();
|
var filetype = filepath.split( '.' ).pop().toLowerCase();
|
||||||
var className, template;
|
var className;
|
||||||
|
var template;
|
||||||
|
|
||||||
className = options.classPrefix + path.basename( data.path ).split( '.' )[0] + options.classSuffix;
|
className = options.classPrefix + path.basename( data.path ).split( '.' )[0] + options.classSuffix;
|
||||||
filetype = options.usePlaceholder ? filetype : filetype + '_no';
|
filetype = options.usePlaceholder ? filetype : filetype + '_no';
|
||||||
if(options.variables) {
|
|
||||||
|
if (options.variables)
|
||||||
|
{
|
||||||
template = cssTemplates.variables;
|
template = cssTemplates.variables;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
template = cssTemplates[ filetype ] || cssTemplates.default;
|
template = cssTemplates[ filetype ] || cssTemplates.default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ exports.datauri = {
|
|||||||
test.done();
|
test.done();
|
||||||
},
|
},
|
||||||
|
|
||||||
variables_option: function( test)
|
variables_option: function( test )
|
||||||
{
|
{
|
||||||
test.expect( 2 );
|
test.expect( 2 );
|
||||||
|
|
||||||
var file = grunt.file.read;
|
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.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.sass" ), file( "test/expected/base64.variables.sass" ), "SASS variables should be equal." );
|
||||||
|
|
||||||
test.done();
|
test.done();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user