Open bebraw opened 10 years ago
@bebraw interesting. That could quite easily be realized as a separate gulp plugin, if it doesn't exist already :)
Looks like there are two primary options for JS: gulp-esformatter and gulp-jsbeautifier.
Maybe we can pick one of those and integrate it to the narrative? It should ask "Do you want to use a JS beautifier?" in case CoffeeScript path wasn't chosen. In addition if the user answers yes, it should ask at least for indentation. Other options can be tweaked by hand if needed.
How does that sound?
Sounds like a good idea I think!
Here's a little something you can try, https://github.com/bebraw/slush-angular/tree/formatting .
Note that we should perform formatting only on JS/CSS/HTML. It just concats the data for other formats for some reason. Any idea what's a nice way to achieve this sort of thing?
I'm one of those peeps that likes to use four spaces instead of two. Maybe it would make sense to provide some sort of hook that would make it possible to reformat the code easily after generation? That would save up some time.