As we know, minifying CSS and JavaScript makes pages load faster.
In the development phase, if you need a “formatted” version, in Eclipse IDE use CTRL+Shift+F). It produces output like this:
*.cssClass {
background-color: #FFFFFF;
color: #C4C0B9;
border-width: 1px;
border-style: solid;
border-radius: 0px;
padding: 1px;
}
In the deployment phase, an external tool like yuicompressor will produce a minified version, like:
*.cssClass{background-color:#FFFFFF;color:#C4C0B9;border-width:1px;border-style:solid;border-radius:0px;padding:1px;}
The problem is that the development cycle then runs like this:
- Development (initial code)
- Format it
- Test
- Minify
- Test again
- Deployment
If any update is required:
- Development
- format last minified code
- Test
- Minify
- Test again
Is there any trick to automatically round trip between formatted/minified code?
- When in development: show a formatted code
- When in deployment: save a minified code