Permalink
Browse files

keep track of descriptor file stack; new version

  • Loading branch information...
cadorn committed Jan 16, 2012
1 parent ce3f00c commit c48940b9f8a8a23a8fa166814cde2adbe284b5a7
Showing with 7 additions and 1 deletion.
  1. +6 −0 lib/pinf-loader-js/descriptors.js
  2. +1 −1 package.json
@@ -46,6 +46,8 @@ Descriptor.prototype.load = function(path, create, options, callback)
if (!/\.json$/.test(path))
throw new Error("Descriptor file path does not end in '.json': " + path);
+ this.fileStack = [];
+
this.path = path;
if (create === true && !API.FILE.exists(this.path))
{
@@ -78,6 +80,8 @@ Descriptor.prototype.load = function(path, create, options, callback)
}
}
+ this.fileStack.push(this.path);
+
try {
this.json = JSON.parse(FILE.read(this.path));
} catch(e) {
@@ -129,6 +133,8 @@ Descriptor.prototype.load = function(path, create, options, callback)
delete self.json["extends"];
+ self.fileStack.push(path);
+
var json;
try
{
View
@@ -1,7 +1,7 @@
{
"uid": "http://registry.pinf.org/pinf.org/github/loader-js/",
"name": "pinf-loader-js",
- "version": "0.3.9",
+ "version": "0.3.10",
"label": "CommonJS Module Loader",
"description": "Versatile & Complete Cross-Platform CommonJS JavaScript Module, Package & Program Loader",
"homepage": "https://github.com/pinf/loader-js",

0 comments on commit c48940b

Please sign in to comment.