Skip to content

Commit

Permalink
Add option to "noCache" to FileSystemLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
SamyPesse committed Jan 15, 2015
1 parent 5f0c528 commit e7572fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/node-loaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ var chokidar = require('chokidar');
var existsSync = fs.existsSync || path.existsSync;

var FileSystemLoader = Loader.extend({
init: function(searchPaths, noWatch) {
init: function(searchPaths, noWatch, noCache) {
this.pathsToNames = {};
this.noCache = !!noCache;

if(searchPaths) {
searchPaths = lib.isArray(searchPaths) ? searchPaths : [searchPaths];
Expand Down Expand Up @@ -60,7 +61,8 @@ var FileSystemLoader = Loader.extend({
this.pathsToNames[fullpath] = name;

return { src: fs.readFileSync(fullpath, 'utf-8'),
path: fullpath };
path: fullpath,
noCache: this.noCache };
}
});

Expand Down

0 comments on commit e7572fd

Please sign in to comment.