11var fs = require ( 'fs' ) ;
22var path = require ( 'path' ) ;
33var crypto = require ( 'crypto' ) ;
4- var Filter = require ( 'broccoli-filter' ) ;
4+ var Filter = require ( 'broccoli-persistent- filter' ) ;
55var Promise = require ( 'rsvp' ) . Promise ;
66// JSON.stringify is not stable
77var stringify = require ( 'json-stable-stringify' ) ;
@@ -24,10 +24,15 @@ function Fingerprint(inputNode, options) {
2424
2525 options = options || { } ;
2626
27+ if ( typeof options . persist === 'undefined' ) {
28+ options . persist = true ;
29+ }
30+
2731 Filter . call ( this , inputNode , {
2832 extensions : options . extensions || [ ] ,
2933 // We should drop support for `description` in the next major release
30- annotation : options . description || options . annotation
34+ annotation : options . description || options . annotation ,
35+ persist : options . persist
3136 } )
3237
3338 this . assetMap = options . assetMap || { } ;
@@ -70,6 +75,10 @@ Fingerprint.prototype.canProcessFile = function (relativePath) {
7075 return Filter . prototype . getDestFilePath . apply ( this , arguments ) != null ;
7176} ;
7277
78+ Fingerprint . prototype . baseDir = function ( ) {
79+ return path . resolve ( __dirname , '..' ) ;
80+ } ;
81+
7382Fingerprint . prototype . processFile = function ( srcDir , destDir , relativePath ) {
7483 var file = fs . readFileSync ( srcDir + '/' + relativePath ) ;
7584 var self = this ;
0 commit comments