forked from webpack/webpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No errors plugin deprecate (webpack#3570)
* added deprecation with unit test * added deprecation for NoErrorsPlugin in favor of NoEmitOnErrorsPlugin with unit test * add new NoEmitOnErrorsPlugin to exports and add an extra unit test to check that there is no warning when using it * added test for NoEmitOnErrorsPlugin in case of error * git ignore temporary test fixtures
- Loading branch information
1 parent
dc0f4e5
commit 082dc17
Showing
6 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
MIT License http://www.opensource.org/licenses/mit-license.php | ||
Author Tobias Koppers @sokra | ||
*/ | ||
function NoEmitOnErrorsPlugin() {} | ||
|
||
module.exports = NoEmitOnErrorsPlugin; | ||
NoEmitOnErrorsPlugin.prototype.apply = function(compiler) { | ||
compiler.plugin("should-emit", function(compilation) { | ||
if(compilation.errors.length > 0) | ||
return false; | ||
}); | ||
compiler.plugin("compilation", function(compilation) { | ||
compilation.plugin("should-record", function() { | ||
if(compilation.errors.length > 0) | ||
return false; | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require('./file'); |