Comparing version 1.1.2 to 1.1.3
@@ -90,5 +90,8 @@ "use strict"; | ||
var isRealFile = fileUtils.existsSync(prev); | ||
var fragments = uri.split("/"); | ||
var moduleName = fragments[0]; | ||
var relativePath = fragments.slice(1).join("/"); | ||
// pattern to match moduleName/relativePath | ||
// $1 = moduleName (foo or @scope/foo) | ||
// $2 = relativePath | ||
var match = /^((?:@[^\/]+\/[^\/]+)|(?:[^\/]+))\/?(.*)/.exec(uri); | ||
var moduleName = match && match[1]; | ||
var relativePath = match && match[2]; | ||
var mod = eyeglass.modules.access(moduleName, isRealFile ? prev : root); | ||
@@ -95,0 +98,0 @@ var sassDir; |
@@ -22,2 +22,8 @@ "use strict"; | ||
var pkg = packageUtils.getPackage(mod.path); | ||
// if pkg.data is empty, this is an invalid path, so throw an error | ||
if (!pkg.data) { | ||
throw new Error("Could not find a valid package.json at " + mod.path); | ||
} | ||
var modulePath = fs.realpathSync(path.dirname(pkg.path)); | ||
@@ -24,0 +30,0 @@ mod.path = modulePath; |
@@ -50,3 +50,3 @@ "use strict"; | ||
return dependencies; | ||
}, moduleTree.dependencies); | ||
}.bind(this), moduleTree.dependencies); | ||
} | ||
@@ -53,0 +53,0 @@ |
{ | ||
"name": "eyeglass", | ||
"description": "Sass modules for npm.", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"author": { | ||
@@ -34,7 +34,7 @@ "name": "The eyeglass team and contributors", | ||
"debug": "^2.2.0", | ||
"fs-extra": "^0.24.0", | ||
"glob": "^5.0.15", | ||
"lodash.includes": "^3.1.3", | ||
"lodash.merge": "^3.3.2", | ||
"node-sass": "^3.8.0", | ||
"fs-extra": "^0.30.0", | ||
"glob": "^7.1.0", | ||
"lodash.includes": "^4.3.0", | ||
"lodash.merge": "^4.6.0", | ||
"node-sass": "^3.10.1", | ||
"node-sass-utils": "^1.1.2", | ||
@@ -55,4 +55,4 @@ "semver": "^5.0.3" | ||
"handlebars": "^4.0.5", | ||
"mocha": "^2.3.3", | ||
"should": "^7.1.0" | ||
"mocha": "^3.1.0", | ||
"should": "^11.1.0" | ||
}, | ||
@@ -59,0 +59,0 @@ "files": [ |
@@ -64,6 +64,10 @@ [](https://travis-ci.org/sass-eyeglass/eyeglass) | ||
} | ||
] | ||
], | ||
engines: { | ||
sass: sass | ||
} | ||
} | ||
}; | ||
sass.render(eyeglass(options), sass)); | ||
sass.render(eyeglass(options))); | ||
``` | ||
@@ -148,2 +152,6 @@ | ||
] | ||
}, | ||
engines: { | ||
sass: sass | ||
} | ||
@@ -153,3 +161,3 @@ } | ||
// Standard node-sass rendering of a single file. | ||
sass.render(eyeglass(options, sass), function(err, result) { | ||
sass.render(eyeglass(options), function(err, result) { | ||
// handle results | ||
@@ -582,6 +590,9 @@ }); | ||
eyeglass: { | ||
engines: { | ||
sass: sass | ||
}, | ||
normalizePaths: false | ||
} | ||
}; | ||
sass.render(eyeglass(options), sass)); | ||
sass.render(eyeglass(options))); | ||
``` | ||
@@ -588,0 +599,0 @@ |
105438
2344
604
+ Addedfs-extra@0.30.0(transitive)
+ Addedklaw@1.3.1(transitive)
+ Addedlodash.includes@4.3.0(transitive)
+ Addedlodash.merge@4.6.2(transitive)
- Removedfs-extra@0.24.0(transitive)
- Removedglob@5.0.15(transitive)
- Removedlodash._arraycopy@3.0.0(transitive)
- Removedlodash._arrayeach@3.0.0(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._basefor@3.0.3(transitive)
- Removedlodash._baseindexof@3.1.0(transitive)
- Removedlodash._basevalues@3.0.0(transitive)
- Removedlodash._bindcallback@3.0.1(transitive)
- Removedlodash._createassigner@3.1.1(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._isiterateecall@3.0.9(transitive)
- Removedlodash.includes@3.1.3(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.isplainobject@3.2.0(transitive)
- Removedlodash.isstring@3.0.1(transitive)
- Removedlodash.istypedarray@3.0.6(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.keysin@3.0.8(transitive)
- Removedlodash.merge@3.3.2(transitive)
- Removedlodash.restparam@3.6.1(transitive)
- Removedlodash.toplainobject@3.0.0(transitive)
Updatedfs-extra@^0.30.0
Updatedglob@^7.1.0
Updatedlodash.includes@^4.3.0
Updatedlodash.merge@^4.6.0
Updatednode-sass@^3.10.1