Comparing version 0.13.1 to 0.14.0
0.14.0 / 2016-06-14 | ||
=================== | ||
* remove `File#dirty()`, add `File#reset()` | ||
0.13.1 / 2016-06-13 | ||
@@ -3,0 +8,0 @@ =================== |
@@ -136,6 +136,5 @@ | ||
/** | ||
* Flags the file so it will be analyzed by mako. | ||
* Used to reset a file prior to re-running the analyze phase. | ||
*/ | ||
dirty() { | ||
this.analyzed = false; | ||
reset() { | ||
this.history.splice(1); // remove all but original path | ||
@@ -142,0 +141,0 @@ } |
{ | ||
"name": "mako-tree", | ||
"version": "0.13.1", | ||
"version": "0.14.0", | ||
"main": "./lib/tree", | ||
@@ -5,0 +5,0 @@ "description": "The build tree structure used internally by mako", |
@@ -203,10 +203,6 @@ # mako-tree | ||
### File#dirty() | ||
### File#reset() | ||
Can be used by the `prewrite` hook to mark a file as "dirty" so that it should be analyzed again. | ||
Used by mako to reset a file enough that it can be safely processed again. | ||
For example, [mako-stat](http://github.com/makojs/stat) will use this method whenever the | ||
modification time for a file has changed, which indicates to mako that analyze needs to be run | ||
again for this file. | ||
### File#toJSON() | ||
@@ -213,0 +209,0 @@ |
@@ -194,14 +194,7 @@ | ||
describe('#dirty()', function () { | ||
it('should turn off the analyzed flag', function () { | ||
let file = new File('index.jade'); | ||
file.analyzed = true; | ||
file.dirty(); | ||
assert.isFalse(file.analyzed); | ||
}); | ||
describe('#reset()', function () { | ||
it('should reset the path back to the initial', function () { | ||
let file = new File('index.jade'); | ||
file.type = 'html'; | ||
file.dirty(); | ||
file.reset(); | ||
assert.strictEqual(file.path, 'index.jade'); | ||
@@ -208,0 +201,0 @@ }); |
61657
1418
218