Hey @TheLarkInn,
Thanks for getting back to me on twitter.
What I was looking for was some type of webpack snippet that I could place in my config file so that I could add the ability to do a npm run tdd
from my package.json
. In there I would call webpack with some argument that would run the task to sit and watch like webpack --watch --progress --hide-modules tdd
and run the task so that I could do the following:
- Watch for
*.php
files in my directory tree of my choosing. - When any file changes, execute the
./vendor/bin/phpunit
command - Bonus: If it is also possible to do something where I do webpack –watch –progress –hide-modules tdd –filter=sometest
, that would be cool too so that I can run the
./vendor/bin/phpunit –filter=somtest` command.
The motivation here is that @jefferyway has come out with laravel-mix. But currently it lacks the ability to do this, so I was hoping to figure out the webpack.config.js
tricks to add this in so I could contribute to that other project.
Cheers!
Adam
@cmosguy Woking “TDD” solution (not an elegant one) for Laravel 5.4 using Webpack and Mix:
To start it, just run
npm run tdd
on console.