component-lesser
Advanced tools
Comparing version 0.0.3 to 0.0.4
11
index.js
@@ -20,4 +20,7 @@ var async = require('async'); | ||
var lessImport = []; | ||
builder.on('dependency', function(b){ | ||
builder.on('dependency', depHandler); | ||
function depHandler(b){ | ||
b.dep = true; | ||
b.on('dependency', depHandler); | ||
b.config.styles.forEach(function(file){ | ||
@@ -28,3 +31,3 @@ if(isLess(file) && !~lessImport.indexOf(b.path(file))){ | ||
}); | ||
}) | ||
} | ||
builder.hook('before styles', function (builder, callback) { | ||
@@ -38,3 +41,2 @@ if(!builder.root) { | ||
builder.config.styles.slice().forEach(function(file){ | ||
console.log(isLess(file) && !~lessImport.indexOf(builder.path(file)), file); | ||
if(isLess(file) && !~lessImport.indexOf(builder.path(file))){ | ||
@@ -49,5 +51,5 @@ lessImport.push(builder.path(file)); | ||
}); | ||
var parser = new less.Parser(options.env || {}); | ||
var cssConfig = options.cssConfig || {}; | ||
setTimeout(function(){ | ||
parser.parse(importsLess, function (error, tree) { | ||
@@ -62,2 +64,3 @@ if (error) { | ||
}); | ||
},1000); | ||
}); | ||
@@ -64,0 +67,0 @@ }; |
{ | ||
"name": "component-lesser", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A plugin to transpile Less files for the compy.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
4001
57