Comparing version 1.0.1 to 1.1.0
@@ -7,2 +7,8 @@ # Change Log | ||
## 1.1.0 | ||
_2020-03-18_ | ||
- feat: Bundler suppresses empty/meta module file tokens | ||
## 1.0.1 | ||
@@ -9,0 +15,0 @@ |
{ | ||
"name": "cssserve", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -220,11 +220,16 @@ #!/usr/bin/env node | ||
// if (/\/\*!\s*@deps\s/.test(cssSource.slice(0, 1000))) { | ||
var match = cssSource.match(/\/\*!\s*@deps\s([^*]+)\*\//); | ||
var match = cssSource.match(/\/\*!\s*@deps(?:\s([^*]*))\*\//); | ||
if (match) { | ||
return match[1] | ||
var deps = match[1] | ||
.replace(/\n|,|;/g, ' ') | ||
.trim() | ||
.split(/\s+/); | ||
.split(/\s+/) | ||
.filter(function (x) { return x; }); | ||
deps.hasCSS = cssSource.replace(match[0], '').trim().length > 0; | ||
return deps; | ||
} | ||
// } | ||
return []; | ||
var empty = []; | ||
empty.hasCSS = cssSource.trim().length > 0; | ||
return empty; | ||
}; | ||
@@ -339,3 +344,3 @@ | ||
var deps = getDepsFor(contextFile); | ||
return deps.reduce(parseDepsTree, list).concat([moduleName]); | ||
return deps.reduce(parseDepsTree, list).concat(deps.hasCSS ? [moduleName] : []); | ||
}; | ||
@@ -342,0 +347,0 @@ modules = modules.slice(0).sort(lowercaseFirstCompare); |
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
27072
508