Comparing version 0.12.0 to 0.12.1
0.12.1 / 2016-06-07 | ||
=================== | ||
* add object support to findFile | ||
0.12.0 / 2016-06-07 | ||
@@ -3,0 +8,0 @@ =================== |
@@ -65,6 +65,7 @@ | ||
* | ||
* @param {String} path The absolute path to search for. | ||
* @param {File|String} file The path to search for. | ||
* @return {File} | ||
*/ | ||
findFile(path) { | ||
findFile(file) { | ||
let path = typeof file === 'string' ? file : file.path; | ||
for (let vertex of this.graph.vertices()) { | ||
@@ -71,0 +72,0 @@ let file = vertex[1]; |
{ | ||
"name": "mako-tree", | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"main": "./lib/tree", | ||
@@ -5,0 +5,0 @@ "description": "The build tree structure used internally by mako", |
@@ -56,3 +56,3 @@ | ||
describe('#findFile(path)', function () { | ||
describe('#findFile(file)', function () { | ||
let tree = new Tree(); | ||
@@ -73,2 +73,6 @@ let file = tree.addFile('/path/to/index.jade'); | ||
}); | ||
it('should support passing objects', function () { | ||
assert.strictEqual(file, tree.findFile({ path: '/path/to/index.html' })); | ||
}); | ||
}); | ||
@@ -75,0 +79,0 @@ |
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
58045
1338