Commit Graph

3355 Commits

Author SHA1 Message Date
Tim Sebastian 833c0330fd refactor source method of contextmodule 2017-02-18 22:41:39 +11:00
Tim Sebastian f77775d0f6 refactor `size` 2017-02-18 21:13:39 +11:00
Tim Sebastian a61ec92a0a simplify build by early returning if no dependencies exist 2017-02-18 21:09:18 +11:00
Tim Sebastian 4d6fafe1b5 simplify identifiers 2017-02-18 20:29:21 +11:00
Tim Sebastian a3f0da5b89 describe prettyRegExp and give param an better name 2017-02-18 20:26:47 +11:00
Tim Sebastian 084d11231b cleanup contextify usage by passing context directly as parameter 2017-02-18 20:15:29 +11:00
Tim Sebastian 4cd13ca651 refactor ContextModule to esnext 2017-02-18 20:14:43 +11:00
Tobias Koppers 27deabcefe Merge pull request #4259 from timse/refactor-normalmodule-to-es6
Refactor NormalModule to es6
2017-02-16 11:03:29 +01:00
Tobias Koppers 3edf64534b Merge pull request #4273 from webpack/test/dep-and-etp
updated api for extract-text-webpack-plugin
2017-02-16 10:59:32 +01:00
Tim Sebastian db2626595c fix test and linting 2017-02-16 19:31:58 +11:00
Tim Sebastian c06b0665d2 apply review tasks 2017-02-16 08:01:09 +11:00
Tobias Koppers 86f7df128a Merge pull request #4286 from abaracedo/fix-typo-1
Fix typo
2017-02-15 19:59:48 +01:00
Alejandro Bar Acedo 2317f980c2 Fix typo in template 2017-02-15 19:00:43 +01:00
Tobias Koppers d0f1f6e770 Merge pull request #4134 from SebastianS90/uglifyjs-extract-comments
UglifyJsPlugin: extract comments to separate file
2017-02-15 15:07:54 +01:00
Tobias Koppers f91cb927be Merge pull request #4075 from webpack/feature/optimize_parse_for_each_to_loop
feat(parser) optimize parse for each to loop
2017-02-15 15:02:28 +01:00
Tobias Koppers 8f9b4721eb replace loader with use for the ETP 2017-02-15 14:38:19 +01:00
Tobias Koppers 3f3586e035 Merge pull request #4282 from mohsen1/patch-1
Add more granular schema for stats in options schema
2017-02-15 14:10:25 +01:00
Tobias Koppers 6542e42078 Merge pull request #4112 from timse/cleanup-chunk
Cleanup chunk
2017-02-15 12:41:37 +01:00
Alejandro Bar Acedo f01f04e1bd Fix typo
This PR only fixes a typo
2017-02-14 21:12:45 +01:00
Tim Sebastian b2b7021582 skip the windows path test for now 2017-02-14 22:55:55 +11:00
Mohsen Azimi 1ee598a08e Add "absolutePath": true to stats.context 2017-02-14 02:51:22 -08:00
Tim Sebastian a7bbe58376 fix style issues 2017-02-14 21:47:55 +11:00
Tobias Koppers 812689e580 Merge pull request #4278 from Reduxx/bugfix/spelling-mistake-min-chunk-size-plugin
fix spelling error in MinChunkSizePlugin
2017-02-14 11:44:50 +01:00
Tobias Koppers 3a8c32bea6 Merge pull request #4280 from simon04/issue-4270
Fix name of contexts created using `import()`
2017-02-14 11:44:27 +01:00
Tobias Koppers 7a39b049ef Merge pull request #4281 from e-jigsaw/fix-typo
fix typo
2017-02-14 11:43:59 +01:00
Tim Sebastian f418e4d5ae add tests for newly added methods 2017-02-14 21:28:32 +11:00
Tim Sebastian f4d8c5f20f fix inner loop of "remove" method
as it is not guaranteed that the the chunk has parents the loop may not be run
this could lead to stale "this" still being a parent of one of its childs.
therefore we have to loop the chunks again.
2017-02-14 21:16:10 +11:00
Tim Sebastian 99d7cb8140 revert changes to `removeAndDo` as it has external deps like ExtractTextPlugin 2017-02-14 21:16:10 +11:00
Tim Sebastian 4438ac9880 remove "removeAndDo" and make usage inline and explicit 2017-02-14 21:16:10 +11:00
Tim Sebastian 9e60f2c302 fixup integratedSize to reflect original functionality 2017-02-14 21:16:10 +11:00
Tim Sebastian 7305593987 rename other to otherChunk 2017-02-14 21:16:10 +11:00
Tim Sebastian f062f49a70 make clearer what "parents" are 2017-02-14 21:16:10 +11:00
Tim Sebastian 3b4eb0f832 more readable variables 2017-02-14 21:16:09 +11:00
Tim Sebastian 63f0930161 simplify size calculation
add "moduleSize" calculator, add multiply and overhead helper
2017-02-14 21:16:09 +11:00
Tim Sebastian aaee63a500 make variables more readable 2017-02-14 21:16:09 +11:00
Tim Sebastian dd5eb39dd3 remove unnecessary passing of "this" argument - done via arrow functions 2017-02-14 21:16:09 +11:00
Tim Sebastian 2f58138516 remove unnecessary iteration if b.chunks is not set 2017-02-14 21:16:09 +11:00
Tim Sebastian 9f27e92d42 use replaceChunk and replaceParent in "integrate" method 2017-02-14 21:16:09 +11:00
Tim Sebastian 848b5aeb92 add two helper methods `replaceChunk` and `replaceParent`
they take an old item and a new item, remove the old item and add the new one
2017-02-14 21:16:09 +11:00
Tim Sebastian 5fa6caafd6 use method "moveModule" instead of duplicating it when integrating chunk 2017-02-14 21:16:09 +11:00
Tim Sebastian fc36ac366d use easier readable variable name in moveModule 2017-02-14 21:16:08 +11:00
Tim Sebastian 779c753baf transfer add logic for module, block, parent, chunk to prototype
bringing the "adder" logic to the prototype might be slighly better performance wise
reuse of logic for add module and block, though they now have one superfluous check (should be negligable though)
2017-02-14 21:16:08 +11:00
Tim Sebastian 071b504a84 merge iteration of parent and sub chunks
merge and document iteration over parent and subchunks in remove method
this will slightly increase performance for removing chunks as it only
iterates once over all chunks and parents'
2017-02-14 21:16:08 +11:00
Tim Sebastian f7e9d5805f use easier to read variable names 2017-02-14 21:16:08 +11:00
Tim Sebastian 14894f065f not needed as arrow functions keep "this" 2017-02-14 21:16:08 +11:00
Tim Sebastian e0da9a8c44 the point of the arrow function is to not need a context passed in 2017-02-14 21:16:08 +11:00
Tim Sebastian 4ea380ff68 no need to add removeAndDo to the context
no one else is using it on chunks and `_` indicates its private anyways
2017-02-14 21:16:08 +11:00
Tim Sebastian 3812c101b1 add tests for preventParsing and applyNoParseRule 2017-02-14 21:14:57 +11:00
Tim Sebastian eb2d6d6d5f add tests for NormalModule 2017-02-14 20:38:47 +11:00
Mohsen Azimi 43bd355adf Fix formatting 2017-02-13 18:31:50 -08:00