Commit Graph

123 Commits

Author SHA1 Message Date
Tobias Koppers 1ff24a7bab Merge pull request #5359 from esbenp/cli-prepend-plugins-4260
prepend plugins instead of append when defined through CLI
2017-09-14 09:24:10 +02:00
Gyandeep Singh 4f5e78bc0f Use statsSync isDirectory to check dir 2017-09-05 21:25:41 -05:00
Gyandeep Singh cedc09dbe6 Fix: Add path separator to avoid file and folder name mixup(fixes #5576) 2017-09-04 15:23:54 -05:00
Civa Lin 5a2f7ead82 fix: cli --watch-poll not accept number correctly
The document say "--watch-poll" option can determine "The polling
interval for watching (also enable polling)". But the previous
implement only accept boolean value and no way to set the interval.

This patch try to fix this problem by allow number input like this:
"--watch-poll=100".

This patch also try to keep the original behavior not be changed as much
as possible. So "--watch-poll" and "--watch-poll=true" are still
acceptable (enable the polling ability).

But still has one incompatible change: original "--watch-poll=" mean
disable polling but after this fix it mean enable polling. It's due to
yargs can not differentiate the different between "--watch-poll" and
"--watch-poll=" when using string type option. So no way to workaround
for this problem.
2017-08-15 09:52:01 +08:00
Esben Petersen 183e649e8d ensure plugins array in addPlugin method 2017-07-25 13:58:45 +02:00
Esben Petersen 2fdd833519 prepend plugins instead of append when defined through CLI
closes #4260
2017-07-24 14:45:53 +02:00
Tobias Koppers 991b360c90 fix useless-escape linting issues 2017-07-24 11:54:06 +02:00
Esben Petersen 47d4180f11 post-review 2017-07-24 09:06:29 +02:00
Esben Petersen 9f12f2f2af fix linting 2017-07-23 22:07:56 +02:00
Esben Petersen d211ffb3f3 rename --module-bind-x config keys from (pre/post)Loaders to rules
will also add enfore:pre/post to the rule configuration

closes #4917
2017-07-23 22:00:27 +02:00
Ryan Harvey 3c77b07212 add CLI option for selecting a config from a multi-config 2017-07-20 14:21:50 -05:00
Anders D. Johnson 24ac48d2f5
feat: support config functions with multi-compiler 2017-07-01 13:28:20 -05:00
Ryan Harvey 14a9dee1f0 allow mutli-file entry via CLI 2017-02-20 13:33:20 -06:00
Tobias Koppers b1e5949523 make CLI passed arguments absolute 2017-02-09 23:24:23 +01:00
Tobias Koppers 951a7603d2 Merge pull request #3889 from cletusw/args-undefined-master
Support UglifyJsPlugin with no arguments in CLI --plugin
2017-01-11 13:03:23 +01:00
Tobias Koppers 8e69a80847 code linting 2017-01-11 12:29:01 +01:00
Clayton Watts 5f4481940b Support UglifyJsPlugin with no arguments in CLI --plugin
UglifyJsPlugin checks `typeof options !== "object"`, which doesn't work as expected with `null` since its type is `"object"`. a1dca894d9/lib/optimize/UglifyJsPlugin.js (L16)

See 48e17ab308 (commitcomment-20424582)
2017-01-11 12:20:59 +01:00
Sean Larkin 7327ee608a chore(eslint): added eslint-node-plugin (#3652) 2016-12-30 17:13:49 -06:00
Sean Larkin aa8d01bf8d refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot (#3636)
* refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot

* This change allows for buildin to now be part of the lint test by addition of an extra .eslintrc file which extends existing but sets es6 to false
* Turned on no-unused-vars for eslint, and then removed all warnings from turning that feature on
* Was getting notified of errors in "quote" property in eslintrc, so changed to correct value from error to 2.

* beautify

* swap invalid eslint config val
2016-12-30 09:43:49 -06:00
Kees Kluskens 644e3a009b Upgrade eslint (#3626)
* Upgrade eslint

* Pin down eslint version

* Temporary fix for difference between js-beautify and eslint

js-beautify suddenly requires a space between `while` here,
but everywhere else we use it without space.

* Remove redundant rules (present in eslint:recommended)

* Add rules comparable to js-beautify rules to eslint

* Add some forgotten files

* Ugh, fix some differences between eslint and js-beautify the nuclear way

* Add back variables
2016-12-29 10:10:41 -06:00
Tobias Koppers f4ab7fc7e2 more performance improvements 2016-12-14 16:22:54 +01:00
Tobias Koppers 5225c000c1 fixes --cache and --no-cache 2016-12-07 16:18:33 +01:00
Tobias Koppers 712a91488d `--module-bind` automatically appends -loader
fixes browsertests
2016-11-16 13:32:16 +01:00
Tobias Koppers 91cbb4c288 removed DedupePlugin
it's no longer needed for npm3
and causes many issues
2016-11-15 09:25:58 +01:00
Kees Kluskens 985a651e0f Implement feedback
- Rename `validateWebpackOptions` -> `validationSchema`
- Export `WebpackOptionsValidationError` on webpack.
2016-11-02 17:27:02 +01:00
Tobias Koppers 626fbbbec9 Merge branch 'master' into fix/eslint-no-inner-declarations-warnings 2016-10-31 13:43:34 +01:00
Kees Kluskens 62c89ec98f Using --version or -v would display the help menu
This worked before the optimist -> yargs migration, but was not migrated properly.
2016-10-30 13:35:05 +01:00
Tushar Sonawane 6b39a5325c fix 'no-inner-declarations' warnings 2016-10-29 19:30:01 +05:30
Tobias Koppers 595de75fdc Merge pull request #3007 from asarode/master
Support multiple config compiler flags (#2835)
2016-09-19 22:08:29 +02:00
Moorthy Venkatraman b3e901d1fc remove defaulter 2016-09-19 22:03:09 +02:00
Tobias Koppers c675067bcf fixed some validation stuff 2016-09-19 21:57:12 +02:00
arjun 19c739568e Make configFiles always be an array 2016-09-18 11:08:01 -07:00
arjun 77ec1fdb71 Support multiple config compiler flags 2016-09-17 22:42:56 -07:00
Gajus Kuizinas 9e0a95e48b fix: improve error phrasing 2016-09-17 20:22:59 +01:00
Gajus Kuizinas e57b3a7631 feature: log options validations errors in CLI
Ajv is using doT to compile validation logic. There is minimal overhead validating an object against a pre-compiled schema. In case of the CLI, options will be validated once by the CLI engine and the second time by API.

I prefer to explicitly handle error checking rather than relying on an error getting thrown by the API engine.

API needs to retain “validationErrors” object nevertheless to enable debugging when using webpack programmatically.
2016-09-17 20:21:07 +01:00
Kenny Cosca 142ad9dae9 Adding option ( -v or --version ) to print version. (#2935) 2016-09-07 20:37:24 +02:00
Tobias Koppers 38e058f438 fixes #2754 2016-07-13 12:56:36 +02:00
Max Stoiber e9b985c852 Add --resolve-extensions support to CLI (#2696)
* Add --resolve-extensions support to CLI

Wasn't supported so far, closes #1447

* Make --resolve-extensions a yargs array type

* Fix linting
2016-06-28 19:09:38 +02:00
Tobias Koppers d16459ba12 enable uglifyjs sourcemap via CLI if using source-map devtool
fixed #2590
2016-06-04 12:16:33 +02:00
Tobias Koppers a657634607 disabled multi step HMR, because it seems to have issues 2016-05-05 17:11:20 +02:00
Adam Krebs 0f5cd21303 Sort config extensions so .js is always first. Fixes #1803 2016-03-17 15:46:55 -04:00
Johannes Lumpe 405c141859 dot notation for `default` 2016-03-03 12:12:06 +02:00
Johannes Lumpe b1078b8f83 Check es6 default export against `null`, swapped `null` check in `processConfiguredOptions` 2016-03-01 12:44:30 +02:00
Johannes Lumpe acccd86256 Fixed linting issue 2016-02-29 11:07:14 +02:00
Johannes Lumpe 894be00b2f Update convert-argv.js
Removed old code
2016-02-29 10:25:21 +02:00
Johannes Lumpe fe71cde0d9 Update convert-argv.js
Allow usage of ES6 default exported function for config
2016-02-29 10:23:44 +02:00
Tobias Koppers aa55d80925 fixed detection of output.filename 2016-01-19 19:35:05 +01:00
Kenny Tran eebc5ceaf6 Fix no-redeclare in code 2016-01-18 18:57:42 -08:00
Tobias Koppers 2e5a5f9db3 more pretty CLI options, added --verbose option 2016-01-14 21:21:09 +01:00
Tobias Koppers 46b12b2095 better ProgressPlugin and fixed bug for multi-compilation 2016-01-09 23:48:37 +01:00