stylecow-plugin-import
Advanced tools
Comparing version 4.0.0 to 4.0.1
15
index.js
@@ -12,16 +12,17 @@ var url = require('url'); | ||
fn: function (atrule) { | ||
var file = atrule.getData('file'); | ||
var importUrl = atrule.get('String').name; | ||
if (!file) { | ||
//is absolute? | ||
if (url.parse(importUrl).hostname || (importUrl[0] === '/')) { | ||
return; | ||
} | ||
var importUrl = atrule.get('String').name; | ||
//get the root file | ||
var rootFile = atrule.getParent('Root').getData('file'); | ||
//is absolute? | ||
if (url.parse(importUrl).hostname || (importUrl[0] === '/')) { | ||
if (!rootFile) { | ||
return; | ||
} | ||
file = path.join(path.dirname(file), importUrl); | ||
var file = path.join(path.dirname(rootFile), importUrl); | ||
@@ -53,3 +54,3 @@ //prevent infinite recursion | ||
string.name = relative + '/' + src; | ||
string.name = path.join(relative, src); | ||
}); | ||
@@ -56,0 +57,0 @@ |
{ | ||
"name": "stylecow-plugin-import", | ||
"description": "Stylecow plugin to include the @import css files with relative paths in the main css file", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"author": "Oscar Otero <oom@oscarotero.com>", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/stylecow/stylecow-plugin-import", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18490
26
754
0