I’m a big fan of the popular HTML5 Boilerplate. I’d love to use the build script to minifiy etc, but I can’t figure out how to get everything working together. To add further fun, I deploy using Git – no FTP.
Paul Irish’s video on using the build script is great, and at the end he shows a way to deploy on a server, then use .htaccess to reroot traffic from .com/ to .com/published/site/ – however that doesn’t really work when you’ve got a webapp and you’re using views. It’s also a really bad habit to put any code in public_html.
So here’s the structure I’m after of the deployed and built site:
- webapp
- app
- classes
- welcome.php
- views
- template.php
- framework
- public_html
- index.php
- css
- js
- img
But it needs to:
- Be still able to develop locally, without having to build every time!
- Be Gitable – deploy to server, then build
- Minify and read views from webapp
My first attempt ended up like this:
- webapp
- app
- classes
- welcome.php
- views
- template.php
- framework
- public_html
- index.php
- css (minified)
- js (minified)
- img (minified)
- dev_html
- index.php
- build
- etc...
- css
- js
- img
Then I published back up, but then completely forgot about the fact that the HTML file that needs reading is in the webapp, so then I get stuck.
It’s a bit complicated so do ask if you don’t get it!