grunt-fontello
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -33,5 +33,2 @@ /* | ||
fontello: { | ||
options: { | ||
sass: true | ||
}, | ||
test: { | ||
@@ -42,3 +39,4 @@ options: { | ||
styles: 'test/output/css', | ||
// zip: 'test/output', | ||
// scss: true | ||
// zip: 'test/output', | ||
force: true | ||
@@ -45,0 +43,0 @@ } |
{ | ||
"name": "grunt-fontello", | ||
"description": "Download font library from fontello.com", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"homepage": "https://github.com/jubalm/grunt-fontello", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -33,3 +33,3 @@ # grunt-fontello | ||
styles : 'output/css', | ||
sass : true, | ||
scss : true, | ||
force : true | ||
@@ -68,3 +68,3 @@ } | ||
#### <a id="options_sass"></a>options.sass | ||
#### <a id="options_scss"></a>options.scss | ||
Type: `Boolean` | ||
@@ -71,0 +71,0 @@ Default value: `false` |
@@ -39,7 +39,8 @@ // TODO: Clean up comments | ||
grunt.log.write('Verify paths...'); | ||
async.parallel([ | ||
var tests = [ | ||
processPath.bind(null, options, options.fonts), | ||
processPath.bind(null, options, options.styles) | ||
], function(err, results){ | ||
if(err) { | ||
]; | ||
async.parallel(options.styles ? tests : [tests[0]], function(err, results){ | ||
if(err) { | ||
grunt.log.error(err); | ||
@@ -118,9 +119,2 @@ callback(err); | ||
switch(ext){ | ||
// Extract CSS | ||
case '.css': | ||
// SCSS: | ||
var cssPath = (options.scss) ? | ||
path.join(options.styles, path.basename(entry.path)) : | ||
path.join(options.styles, '_' + path.basename(entry.path).replace(ext, '.scss')); | ||
return entry.pipe(fs.createWriteStream(cssPath)); | ||
// Extract Fonts | ||
@@ -130,4 +124,14 @@ case '.woff':case '.svg': case '.ttf': case '.eot': | ||
return entry.pipe(fs.createWriteStream(fontPath)); | ||
// Extract CSS | ||
case '.css': | ||
// SCSS: | ||
if (options.styles) { | ||
var cssPath = (!options.scss) ? | ||
path.join(options.styles, path.basename(entry.path)) : | ||
path.join(options.styles, '_' + path.basename(entry.path).replace(ext, '.scss')); | ||
return entry.pipe(fs.createWriteStream(cssPath)); | ||
} | ||
// Drain everything else | ||
default: | ||
grunt.verbose.writeln('Ignored ', entry.path); | ||
entry.autodrain(); | ||
@@ -156,2 +160,2 @@ } | ||
fetch : fetchStream | ||
}; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17490
489