tighten / jigsaw

Simple static sites with Laravel’s Blade.
https://jigsaw.tighten.com
MIT License
2.13k stars 181 forks source link

npm run watch --pretty=false #323

Closed iainheng closed 5 years ago

iainheng commented 5 years ago

How do I disable pretty URL --pretty=false while developing with npm run watch ?

cossssmin commented 5 years ago

You could do something based on the environment, in tasks/build.js.

For example, in Maizzle, I create a variable:

let prettyURLs = config.pretty == false ? '--pretty=false ' : '';

and then I use it in the command.get():

command.get(bin.path() + ' build ' + prettyURLs + env, (error, stdout, stderr) => {
damiani commented 5 years ago

That's a great solution, you're also free to add --pretty=false directly to the build command in tasks/build.js if you don't need it controlled by environment.