NHSLeadership / nightingale-wp

Other
1 stars 0 forks source link

[refs #00017]Use minified css #18

Closed Android63 closed 7 years ago

Android63 commented 7 years ago

Add switch to use style.min.css if it exists.

cehwitham commented 7 years ago

@Android63 presumably in development, we wouldn't generate the minified styles so it wouldn't load? Just thinking the caching could be nasty for dev testing.

Android63 commented 7 years ago

I have npm run build/watch set up to generate both expanded and minified css but it's easy to delete the minified version for debugging and the site will switch to the expanded version. Potentially, we could use a "dev" feature flag...

cehwitham commented 7 years ago

I've seen it done before where you have a watch function for during dev and a deploy function that build the minified assets for production.

Android63 commented 7 years ago

That seems like a good idea. I could set this up in npm, but I think we may be moving to gulp.

Android63 commented 7 years ago

I'd like to merge this PR if you have no objections @cehwitham

cehwitham commented 7 years ago

@Android63 is this going to hinder you in development if you're always getting minified css?

Android63 commented 7 years ago

No, because I have a separate npm build command to generate minified css