Commit Graph

305 Commits

Author SHA1 Message Date
evilebottnawi 8203154a54 fix: usage `npx webpack` 2021-06-07 17:34:31 +03:00
Nitin Kumar 1404fd5d91 fix: webpack-cli installation message 2021-01-06 18:02:26 +05:30
Nitin Kumar fa7686c0f9
refactor: logic suggestions from code review
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2020-11-20 18:03:05 +05:30
Nitin Kumar e827f4fc44 refactor: packageManager logic for perf improvement 2020-11-07 17:43:38 +05:30
Nitin Kumar c885f6d7dc feat: add pnpm support for installing CLI 2020-11-07 08:28:32 +05:30
evilebottnawi 33a9e877b7 fix: run cli after installed 2020-10-28 14:10:10 +03:00
evilebottnawi dafa4cd69a chore: setup cspell 2020-03-12 19:51:26 +03:00
Ben Schmeckpeper 7ed8023a05 Set the exit code to 1 when webpack-cli is not installed
This ensures that if the callback function is not excuted, the script will exit
with a failure, as it should.  If the user wishes to install webpack-cli, we
clear the exit code from inside the callback function.
2020-02-10 09:08:16 -06:00
Ben Schmeckpeper 0ddecfa7f7
Just one space after periods.
Co-Authored-By: James George <jamesgeorge998001@gmail.com>
2020-02-07 11:57:14 -06:00
Ben Schmeckpeper 542eaf9de2 Exit with an error if we can't prompt for webpack-cli installation.
If STDIN is not in terminal mode when the webpack script is executed, the
readline module will never execute the callback passed to question and the
script will exit successfully, without ever building the pack.  An example of
this is Rails' webpacker gem, which executes the webpack script in a subshell.

If STDIN is not in terminal mode, we should exit with an error immediately,
instead of attempting to ask a question to which we'll never receive an answer.
2020-02-06 13:49:01 -06:00
Tobias Koppers e9c0d068dd refactor filesystem interfaces
add Compiler.intermediateFileSystem
avoid using `path` and `fs` module when possible
move `join`, `mkdirp` and `dirname` into utils
join and dirname is optional in FileSystem interface
remove mkdirp from Filesystem interface
2019-06-11 17:32:58 +02:00
Tobias Koppers abc825d58f Merge tag 'v4.32.0' into next
4.32.0
2019-05-20 14:46:31 +02:00
Pranshu Chittora b6fa2e7024
chore(bin):sets string messages to const
made string message to const, previously it was let
2019-05-10 13:51:38 +05:30
Yuta Hiroto 8017ddee21 fix(bin): remove webpack-command 2019-04-08 20:00:35 +02:00
Tobias Koppers 180f912493 Merge tag 'v4.29.2' into next
4.29.2
2019-02-06 15:37:11 +01:00
Tobias Koppers d7d9b9bfa3 ignore typescript bug 2019-02-06 09:34:20 +01:00
Florent Cailhol c9ebb6e8dc Set exitCode only once 2018-11-08 23:25:48 +01:00
Tobias Koppers 4430524921
Merge pull request #7966 from webpack/refactor-remove-webpack-command-from-clis
refactor: remove `webpack-command` from CLIs
2018-09-10 15:36:18 +02:00
Tobias Koppers b717aadf49 Show only webpack-cli in the list 2018-09-10 14:53:54 +02:00
Tobias Koppers 943aa6b455
Fix exit code when multiple CLIs are installed
fixes #7998
2018-09-06 13:33:12 +02:00
Tobias Koppers 691cc94e0f
Spelling 2018-09-05 14:01:44 +02:00
evilebottnawi 898462db46 refactor: remove `webpack-command` from CLIs 2018-09-04 22:17:49 +03:00
Tobias Koppers ad8f496745 arrow functions, remove or improve eslint-disable comments 2018-06-27 13:48:13 +02:00
Spencer Elliott 2b4ed3d942 require() webpack-cli/webpack-command's bin module
Rather than require()-ing the "main" module in webpack-cli/
webpack-command, require() the "bin" module.

This avoids the issue described in
https://github.com/webpack-contrib/webpack-command/pull/30
where installing packages in this order results in no output from
./node_modules/.bin/webpack:

    $ npm install webpack-command
    $ npm install webpack
    $ ./node_modules/.bin/webpack
    # exit 0 with no output
2018-06-25 10:24:52 -07:00
Tobias Koppers 92bcb81ede wording, optimizations, types, cleanup 2018-05-15 17:06:30 +02:00
evilebottnawi 5230740f6f feat(cli): support `webpack-command` 2018-05-14 17:31:12 +03:00
Tobias Koppers 30c35abb44 use shell mode for windows support 2018-03-29 17:06:10 +02:00
Tobias Koppers 8d8da4cdff Merge branch 'master' into bump_prettier 2018-03-29 11:48:02 +02:00
Tobias Koppers e500384bbd
Remove duplication 2018-03-13 09:36:10 +01:00
Tobias Koppers dfc2396628
Set exit code when installation failed 2018-03-13 09:34:57 +01:00
Tobias Koppers c086dfa14d fix lint 2018-03-09 09:37:41 +01:00
PlayMa256 1abef28830 Replace requirer with node readline
Removing inquirer and updating package.json
2018-03-09 09:37:36 +01:00
PlayMa256 f7af10a0e1 * Pipe stdout and stderr from child_process to main process
* code refactoring and using promises
2018-03-09 09:33:43 +01:00
PlayMa256 18773b133a Simplifying package manager choice and command options 2018-03-09 09:33:29 +01:00
PlayMa256 73d36c07f6 Refactor require statements 2018-03-09 09:33:28 +01:00
PlayMa256 180e2b7dd2 * Pipe stdout and stderr from child_process to main process
* code refactoring and using promises
2018-03-09 09:33:18 +01:00
PlayMa256 58b67248e8 Refactor to scope command detection inside question 2018-03-09 09:32:59 +01:00
PlayMa256 67651ae69d small refactor over calls
Refactor back to resolve.request

Add installation if webpack-cli is not present
2018-03-09 09:32:54 +01:00
matheus.g.silva d4115a65a7 Add installation if webpack-cli is not present 2018-03-09 09:13:33 +01:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
Tobias Koppers 0d533b860f
replace tab with space 2018-01-03 21:06:04 +01:00
Tobias Koppers e3f1002f90 fix linting 2018-01-03 19:56:23 +01:00
Tobias Koppers 1886b7a5cb Merge branch 'master' into next
# Conflicts:
#	bin/webpack.js
#	lib/Compilation.js
#	yarn.lock
2017-12-29 11:17:10 +01:00
Wèi Cōngruì 3823eae5b0 Use process.exitCode instead of process.exit in compilerCallback 2017-12-26 13:54:26 +08:00
Tobias Koppers 272a632ea7
webpack-cli should be added as devDependency 2017-12-13 15:05:12 +01:00
Tobias Koppers 079b5f6275 remove dependencies, ask for installing webpack-cli when using the CLI 2017-12-13 11:58:37 +01:00
Even Stensberg cdefea844e update dependency 2017-12-06 01:46:58 +01:00
Even Stensberg 4b0332d390 sync webpack-cli with changes in bin/* and binCases
remove old bin code

try using the cli folder for bInTestCases

update folders in binTestCases

increase callback timeout to see if that helps

update cli-dep

remove redundant console.log
2017-12-06 01:45:43 +01:00
Tobias Koppers dae9de6595 Merge branch 'next' into feature/validate-plugin-options
# Conflicts:
#	lib/SourceMapDevToolPlugin.js
#	lib/optimize/AggressiveSplittingPlugin.js
#	yarn.lock
2017-11-28 09:59:59 +01:00
Sergey Petushkov 6d7df9daad Add marker fn; Refactor cutOff method; Check error when options are parsed 2017-11-27 08:43:27 +01:00