Commit Graph

14 Commits

Author SHA1 Message Date
Tim Sebastian 58e7a2f30b add simple returnTrue helper, less function definitions 2017-01-21 13:51:35 +11:00
Tim Sebastian 965b7261fa move more ConstDependencies to `toConstantDependency` 2017-01-21 13:51:35 +11:00
timse 86c00207bd Extract to parser helpers (#3843)
* rename ModuleParserHelpers to ParserHelpers

- rename module and file from ModuleParserHelpers to ParserHelpers
- change imports and usages
- rename addParsedVariable to addParsedVariableToModule to add module context again

* introduce setTypeof helper to ParserHelpers

* switch setTypeof in amdplugin - use ParsersHelpers instead

* switch setTypeof in CommonJsPlugin - use ParsersHelpers instead

* switch setTypeof in SystemPlugin - use ParsersHelpers instead

* add ParserHelpers.expressionIsUnsupported method

* use ParserHelpers.expressionIsUnsupported in SystemPlugin and NodeStuffPlugin

* refactor setTypeOf to more atomic helper methods

- reduces sideeffects as parser is called outside of helper
- allows better reuse

* use ParserHelper on more pieces in CommonJsPlugin making BasicEvaluatedExpression obsolete

* switch new BasicEvaluatedExpression().setString(<somestring>).setRange(expr.range) in dependencies to ParserHelpers

* switch other new BasicEvaluatedExpression().setString(<somestring>).setRange(expr.range) to ParserHelpers

* rename wrongly named function - name anonymous functions
2017-01-08 12:11:26 -06:00
Garth Poitras 64f9a16bf6 fix(ProvidePlugin): support properties from modules. Closes #2864 (#3597) 2016-12-28 13:41:09 -06:00
Tim Sebastian 82dcf3d2e6 delete duplicate of line 35
the named identifier for the scopedName is already set in line 35.
Probably because line 35 was at some point lifted to where it is now.
2016-12-19 23:21:07 +11:00
Tobias Koppers ec262a4007 refactoring: moved parser instancation into NormalModuleFactory
breaking change: compiler.parser must no longer be used. Use this instead:

``` js
compiler.plugin("compilation", function(compilation, params) {
  params.normalModuleFactory.plugin("parser", function(parser, parserOptions) {
    parser.plugin(/* ... */);
  });
});
```

required for #2978
2016-09-15 00:22:10 +02:00
Tobias Koppers f7d799adb4 rebeautify without spacing after keyword 2015-07-16 00:19:23 +02:00
Avi Haiat 0a340f2b1a feat(app): Beautify all lib files 2015-07-13 01:20:09 +03:00
Avi Haiat daff7440a6 feat(app): Fix some obvious lint errors and warnings 2015-07-08 15:52:41 +03:00
Tobias Koppers cebd3b9722 added linting 2015-04-23 23:55:50 +02:00
Tobias Koppers 3d153efe27 better handling of nested vars in Define and Provide
fixes #812
2015-02-28 00:26:44 +01:00
Tobias Koppers 1cc87e9b53 added support for nested var in the ProvidePlugin 2014-10-16 22:31:20 +02:00
Tobias Koppers 3170b76b22 webpack 1.0 beta
moved many options to plugins
#113
2013-12-17 23:21:49 +01:00
Tobias Koppers 05152cee7f added provide plugin and option 2013-02-10 20:37:30 +01:00