Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Skookum/connect
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter Loftis committed Jan 20, 2011
2 parents 1348761 + 1742007 commit 95bf8c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/connect/middleware/compiler.js
Expand Up @@ -45,6 +45,7 @@ exports = module.exports = function compiler(options){

var srcDir = process.connectEnv.compilerSrc || options.src || process.cwd(),
destDir = process.connectEnv.compilerDest || options.dest || srcDir,
forceCompile = process.connectEnv.forceCompile || options.forceCompile,
enable = options.enable;

if (!enable || enable.length === 0) {
Expand Down Expand Up @@ -79,8 +80,8 @@ exports = module.exports = function compiler(options){
next(err);
}
} else {
// Source has changed, compile it
if (srcStats.mtime > destStats.mtime) {
// Source has changed, compile it. can optionally be forced to compile
if (forceCompile || srcStats.mtime > destStats.mtime) {
compile();
} else {
// Defer file serving
Expand Down

0 comments on commit 95bf8c8

Please sign in to comment.