sass-module-importer
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -21,3 +21,3 @@ 'use strict'; | ||
if (!pkg.main || pkg.main && !pkg.main.match(/\.s?[c|a]ss$/g)) { | ||
pkg.main = pkg.style || 'index.css'; | ||
pkg.main = pkg.style || pkg['main.scss'] || pkg['main.sass'] || 'index.css'; | ||
} | ||
@@ -61,12 +61,12 @@ return pkg; | ||
return new Promise(function (resolve, reject) { | ||
if (url.match(/\.s[c|a]ss/g) || !resolved) { | ||
if (url.match(/\.css$/g)) { | ||
fs.readFile(url, 'utf8', function (err, contents) { | ||
return err ? reject(err) : resolve({ contents: contents }); | ||
}); | ||
} else { | ||
var resolvedURL = url; | ||
if (prev && prev !== 'stdin' && !path.isAbsolute(url)) { | ||
if (!resolved && prev && prev !== 'stdin' && !path.isAbsolute(url)) { | ||
resolvedURL = path.resolve(path.dirname(prev), url); | ||
} | ||
resolve({ file: resolvedURL }); | ||
} else { | ||
fs.readFile(url, 'utf8', function (err, contents) { | ||
return err ? reject(err) : resolve({ contents: contents }); | ||
}); | ||
} | ||
@@ -73,0 +73,0 @@ }); |
{ | ||
"name": "sass-module-importer", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "jsnext:main": "src/index.js", |
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
15609
0