Skip to content

Commit

Permalink
Merge pull request #354 from SamyPesse/feature/nocacheoption
Browse files Browse the repository at this point in the history
Add option to disable cache in FileSystemLoader
  • Loading branch information
jlongster committed Feb 4, 2015
2 parents dafc9e3 + e7572fd commit 8c6e2bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/node-loaders.js
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 8c6e2bc

Please sign in to comment.