Skip to content

Commit

Permalink
config.webpackWarningFilters is now passed from jester-watch/batch to…
Browse files Browse the repository at this point in the history
… handleWebpackResult().
  • Loading branch information
Oscar de Groot committed Jun 26, 2014
1 parent d796b80 commit 1634703
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/bin/jester-batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var loadConfig = require("../lib/loadConfig"),

var config = loadConfig("./jester.json");

rebuildProject(config.fullEntryGlob, config.artifactPath)
rebuildProject(config.fullEntryGlob, config.artifactPath, config.webpackWarningFilters)
.then(function() {
if(config.srcPath && config.apiDocPath) {
return rebuildDocumentation(config.srcPath, config.apiDocPath, config.jsdocConf, config.readme);
Expand Down
4 changes: 2 additions & 2 deletions src/bin/jester-watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function runTests(path) {
console.log("No tests found for '" + path + "'");
return false;
}
return createTestFile(testFile, config.karmaPath).then(function () {
return createTestFile(testFile, config.karmaPath, config.webpackWarningFilters).then(function () {
return server.run();
});
});
Expand Down Expand Up @@ -74,7 +74,7 @@ function startWatching() {
}

if (filePath.length > 3 && filePath.substr(-3) === ".js") {
var build = rebuildProject(config.fullEntryGlob, config.artifactPath);
var build = rebuildProject(config.fullEntryGlob, config.artifactPath, config.webpackWarningFilters);
if (isReallyFileChangeEvent(changeType, fileCurrentStat, filePreviousStat)) {
when.join(build, runTests(filePath)).done(function(){});
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/createTestFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function createEntryModules(filenames) {
return entryModules;
}

module.exports = function createTestFile(filenames, karmaPath) {
module.exports = function createTestFile(filenames, karmaPath, webpackWarningFilters) {
return webpack({
entry: createEntryModules(filenames),
output: {
Expand All @@ -30,6 +30,6 @@ module.exports = function createTestFile(filenames, karmaPath) {
},
devtool: "#source-map"
}).then(function(stats) {
return handleWebpackResult(stats);
return handleWebpackResult(stats, webpackWarningFilters);
});
};
4 changes: 2 additions & 2 deletions src/lib/rebuildProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function createEntryModules(featureFiles) {
return entryModules;
}

module.exports = function rebuildProject(entryGlob, artifactPath) {
module.exports = function rebuildProject(entryGlob, artifactPath, webpackWarningFilters) {
return clearDir(artifactPath)
.then(function filesCleared() {
return glob(entryGlob);
Expand All @@ -39,6 +39,6 @@ module.exports = function rebuildProject(entryGlob, artifactPath) {
});
})
.then(function (stats){
return handleWebpackResult(stats);
return handleWebpackResult(stats, webpackWarningFilters);
});
};
2 changes: 1 addition & 1 deletion src/lib/runAllTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = function runAllTests(config) {
return glob(config.srcPath + "/**/*.test.js");
})
.then(function (testInputFiles) {
return createTestFile(testInputFiles, config.karmaPath);
return createTestFile(testInputFiles, config.karmaPath, config.webpackWarningFilters);
})
.catch(function(err) {
console.error("failed creating test files ", err);
Expand Down

0 comments on commit 1634703

Please sign in to comment.