I'm using Rails 3 with HAML and SASS and I'd like to achieve the following goals:
- Obfuscate HTML and CSS output to make it a chore for a casual observer to reverse-engineer
- Optimize / minify the output to minimize browser load/parse time
- Keep source easy to read and understand
So if my HAML / SASS looks like this:
:sass
.semantically开发者_StackOverflow社区-named-class {
color: #ffffff;
}
.some-container
.semantically-named-class
Some Content Here
I'd like my output to look something like this:
<html><head><meta>etc.etc.</meta><style type='text/css'>.azY13{color:#ffffff;}</style></head>
<body><div class='zzB79'><div class='azY13'>Some Content Here</div></div></body>
Are there any gems out there to help with this or will I have to roll my own?
Take a look at Jammit. It sounds like it accomplishes a lot of what you're looking for.
精彩评论