Permalink
Browse files

modules with errors are still being watched now.

  • Loading branch information...
kamicane committed Apr 22, 2012
1 parent 6d251fe commit e0892f6d6f6d63998b67a6e4593368a49aefeeee
Showing with 12 additions and 6 deletions.
  1. +12 −6 lib/wrapup.js
View
@@ -102,6 +102,7 @@ var WrapUp = prime({
ast = parser.parse(src)
} catch (err){
this.emit("error:js", modulefull, from, err)
+ this.modules[modulefull] = {err: true}
return null
}
@@ -309,13 +310,18 @@ var WrapUp = prime({
for (var fullpath in this.modules){
var mod = this.modules[fullpath]
- flat.push(replaces(mods, {id: mod.uid, src: mod.src}))
- modules[path.relative(process.cwd(), fullpath)] = mod.deps.map(function(dep){
- for (var fullpath in this.modules){
- if (this.modules[fullpath].uid === dep) return path.relative(process.cwd(), fullpath)
- }
- }, this)
+ if (!mod.err){
+
+ flat.push(replaces(mods, {id: mod.uid, src: mod.src}))
+
+ modules[path.relative(process.cwd(), fullpath)] = mod.deps.map(function(dep){
+ for (var fullpath in this.modules){
+ if (this.modules[fullpath].uid === dep) return path.relative(process.cwd(), fullpath)
+ }
+ }, this)
+
+ }
if (options.watch) watch(fullpath)
}

0 comments on commit e0892f6

Please sign in to comment.