How to pass options via CLI?
See original GitHub issue- Laravel Mix Version: 0.12.1
- Node Version: 8.1.4
- NPM Version: 5.0.3
- OS: Ubuntu 16.04
Description:
So I want to disable notifications. I can do that using mix.disableNotifications()
, but that would mean I have to hardcode it in my webpack.mix.js
. I don’t want that. I want to have a separate run task in package.json which has notifications disabled. So how are you supposed to set notifications=false from CLI?
Steps To Reproduce:
- Try to figure out how to pass notifications=false from CLI
- Fail
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to pass options via CLI? · Issue #1086 · laravel-mix ...
You have access to a global process object, which, among other thins, has an argv property with all command line arguments. More here:...
Read more >Parameters / Arguments - Windows CMD - SS64.com
How-to: Pass Command Line arguments (Parameters) to a Windows batch file. ... You can get the value of any argument using a %...
Read more >Understanding Command Line Arguments and How to Use ...
Command line arguments are extra commands you can use when launching a program so that the program's functionality will change.
Read more >Jest CLI Options
The jest command line runner has a number of useful options. You can run jest --help to view all available options. Many of...
Read more >Command line options - AWS Documentation
In the AWS CLI, command line options are global parameters you can use to ... To pass true binary content, put the content...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I stumbled across the same problem and found a solution that worked quite well for me:
The command:
That’s almost the same I did:
npm run prod-silent
Entry in package.json:
cross-env NODE_ENV=production MIX_NOTIFICATIONS=false node_modules/webpack/bin/webpack.js --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js