TricomB2B / ng-boilerplate

TricomB2B's starting point for Angular 1.5 based hybrid apps and web-app development
The Unlicense
0 stars 0 forks source link

Potential Gulp Plugins #8

Open Taylord93 opened 7 years ago

Taylord93 commented 7 years ago

unCSS – Removes unused CSS as it is compiled from sass. Potentially annoying if creating CSS that is not yet being used so open for debate if its actually worth using, could optimize our sites/apps though

CSS Comb – Style/syntax formatting. Keeps src files the same with predefined variables, also available for js and html Goes beyond just indentation, also examines actual coding style to enforce some sort of uniformity.

CSS Lint – Self explanatory. Also available for html.

Process HTML – Allows you to insert variables while compiling html for production. Could be useful if we need to switch to a CDN for vendor packages, remove the vendors.js file and just throw in the CDN when it gets compiled into production.

JSON format – Format the global data.json file.

fixMyJs – Takes care of the annoying issues from JSHint, like missing semicolons.

All are open for debate.

Toddses commented 7 years ago

I'm fine with trying out unCSS. My concern is that we tend to do a lot of className juggling with Angular (in particular with angular-animate) and those might get stripped out and break things. We'd need to test and be sure it is workable.

I'm not sure CSS Comb will do anything for us, since we use Sass and this doesn't do anything with Sass. We compile the Sass to minified CSS file and we wouldn't want to format that file. And honestly the unminified compiled CSS file looks pretty well formatted.

CSS Lint, I am not sure we can do anything with it. Wouldn't mind looking for a Sass linter though... HTML linter is fine with me.

Process HTML could be useful. Doesn't hurt to add it in at least, and if we can't find any good usecases it's not a big deal to leave it in anyway.

I'm not sure what JSON format would do for us... My JSON data files are pretty well formatted so I'm not sure what it would be doing other than changing the spacing. I couldn't really find an example output on this one to convince me it would be useful.

fixMyJs is a no from me. I'd like us to make sure our source code doesn't produce any linter errors (instead of fixing them through a build process). Plus it doesn't appear that fixMyJs is maintained anymore (dec 2014 was the last release, no response from the owners on issues in a long time) and the've allowed their domain to expire several months ago (fixmyjs.com is some sort of scam site now). I'd be reluctant to use it even if I wasn't against the very idea of it in the first place.