Skip to content

Commit

Permalink
fixed #14
Browse files Browse the repository at this point in the history
  • Loading branch information
yanni4night committed Jul 30, 2016
1 parent 097f498 commit 45a9778
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ origin.freeze().flow([{filename, content}, {filename, content}]).then(files => {
```

## API
- constructor(transformer, cacheable)
- constructor(transformer)
- tag(string)
- connect(stream, mergeFiles)
- pipe(transformer, mergeFiles)
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* 2016-07-30[09:13:29]:use cacheable of transformer
*
* @author yanni4night@gmail.com
* @version 0.7.4
* @version 0.7.6
* @since 0.1.0
*/
'use strict';
Expand Down Expand Up @@ -82,7 +82,7 @@ class PantoStream extends EventEmitter {
}
});

defineFrozenProperty(this, '_cacheable', (transformer ? (transformer.isCacheable ? transformer.isCacheable() : true) :
defineFrozenProperty(this, '_cacheable', (transformer ? (transformer.isCacheable ? transformer.isCacheable() : false) :
false));
defineFrozenProperty(this, '_children', []);
defineFrozenProperty(this, '_transformer', transformer);
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "panto-stream",
"version": "0.7.5",
"version": "0.7.6",
"description": "Stream for panto",
"main": "index.js",
"directories": {
Expand All @@ -14,8 +14,8 @@
"coveralls": "^2.11.9",
"mocha": "^2.5.3",
"mocha-lcov-reporter": "^1.2.0",
"panto": "0.0.28",
"panto-transformer": "^0.2.3",
"panto": "0.0.29",
"panto-transformer": "^0.2.4",
"pre-commit": "^1.1.3"
},
"pre-commit": "test",
Expand Down
5 changes: 4 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* 2016-07-05[23:18:22]:revised
*
* @author yanni4night@gmail.com
* @version 0.7.2
* @version 0.7.6
* @since 0.1.0
*/
'use strict';
Expand Down Expand Up @@ -510,6 +510,9 @@ describe('stream', () => {
}
return super._transform(file);
}
isCacheable() {
return true;
}
}

const p1 = new PantoStream();
Expand Down

0 comments on commit 45a9778

Please sign in to comment.