Skip to content

Commit fd7226e

Browse files
committed
fixes
1 parent eda45fe commit fd7226e

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

lib/Compilation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Compilation.prototype.addEntry = function process(context, entry, name, callback
195195
callback();
196196
}.bind(this);
197197

198-
if(!(entry instanceof Dependency))
198+
if(!(typeof entry == "object" && entry != null && entry.Class))
199199
return callback(new Error("Parameter 'entry' must be a Dependency"));
200200

201201
var moduleFactory = this.dependencyFactories.get(entry.Class);

lib/Compiler.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ Compiler.prototype.createChildCompiler = function(compilation, compilerName, out
227227
return childCompiler;
228228
};
229229

230+
Compiler.prototype.isChild = function() {
231+
return !!this.parentCompilation;
232+
};
233+
230234
Compiler.prototype.createCompilation = function() {
231235
return new Compilation(this);
232236
};

lib/ProgressPlugin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ProgressPlugin.prototype.apply = function(compiler) {
1616
handler(0.1 + (doneModules / Math.max(lastModulesCount, moduleCount)) * 0.6, doneModules + "/" + moduleCount + " build modules");
1717
}
1818
compiler.plugin("compilation", function(compilation) {
19+
if(compilation.compiler.isChild()) return;
1920
lastModulesCount = moduleCount;
2021
moduleCount = 0;
2122
doneModules = 0;

lib/node/NodeWatchFileSystem.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ NodeWatchFileSystem.prototype.watch = function(files, dirs, startTime, delay, ca
137137
fileTimestamps[item.path] = ts;
138138
if(ts >= startTime) {
139139
item.dirty = true;
140-
change();
140+
change(item.path);
141141
}
142142
callback(ts);
143143
});
@@ -146,25 +146,26 @@ NodeWatchFileSystem.prototype.watch = function(files, dirs, startTime, delay, ca
146146
if(err) {
147147
item.dirty = true;
148148
if(item.type == 2) dirTimestamps[item.path] = Infinity;
149-
change();
149+
change(item.path);
150150
return callback(Infinity);
151151
}
152152
traverse(item.path, files, function(ts) {
153153
if(item.type == 2) dirTimestamps[item.path] = ts;
154154
if(ts >= startTime) {
155155
item.dirty = true;
156-
change();
156+
if(item.type == 2) change(item.path);
157157
}
158158
return callback(ts);
159159
});
160160
});
161161
function flagAllDirty(item) {
162-
if(item.children) {
162+
if(item.children && item.children.length > 0) {
163163
item.children.forEach(function(i) {
164164
i.dirty = true;
165165
if(i.type == 1) fileTimestamps[i.path] = Infinity;
166166
else if(i.type == 2) dirTimestamps[i.path] = Infinity;
167167
});
168+
change(item.path);
168169
}
169170
}
170171
function traverse(basePath, files, callback) {
@@ -188,6 +189,7 @@ NodeWatchFileSystem.prototype.watch = function(files, dirs, startTime, delay, ca
188189
fileTimestamps[childItem.path] = ts;
189190
if(ts >= startTime) {
190191
childItem.dirty = true;
192+
change(childItem.path);
191193
}
192194
return callback(null, ts);
193195
} else {
@@ -202,6 +204,7 @@ NodeWatchFileSystem.prototype.watch = function(files, dirs, startTime, delay, ca
202204
dirTimestamps[childItem.path] = ts;
203205
if(ts >= startTime) {
204206
childItem.dirty = true;
207+
if(childItem.type == 2) change(childItem.path);
205208
}
206209
return callback(null, ts);
207210
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webpack",
3-
"version": "0.9.0-beta8",
3+
"version": "0.9.0-beta9",
44
"author": "Tobias Koppers @sokra",
55
"description": "Packs CommonJs/AMD Modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.",
66
"dependencies": {

0 commit comments

Comments
 (0)