HTML5 Boilerplate Publish Up The Tree
Sorry it’s not a more creative name...
The problem I had was I wanted the wonderful HTML5 Boilerplate build script to publish up the tree, rather than into a /publish folder. This was because I wanted to be able to use Git with the project, deploy using Git, then build on the server. This is fine for JS apps, and Paul Irish shows a way to do it in the video, but if one is building a web app, the security is not good enough. You shouldn't have any code in your public folder, it should always be above.
Anyway, this is designed for use with Fuel and CodeIgniter, as well as other apps.
At the moment it’s only good for using public_html, no renaming options available, will build those back in soon.
On build, it will remove the /dev/intermediate and /public_html.
How to use
Create a new folder for your web app. You’re looking at the home folder.
Create a folder called ‘dev’ or something similar.
Inside ‘dev’, create a folder called ‘public_html’.
Get a copy of HTML5 Boilerplate (H5BP), however you please.
Put /build from H5BP and put it in ‘dev’
Put everything else from H5BP in ‘public_html’
Download ‘Publish Up The Tree’ (above)
Replace the three files provided:
Download Fuel or CodeIgniter and place in ‘dev’
Add views to /dev/build/config/project.properties as normal
Run build as normal
This is what I’m talking about:
/home/user |-- dev | |-- build | | `-- build.xml etc | | | |-- fuel | | |-- app | | | |-- views | | | | |-- welcome | | | | | |-- index.php | | |-- core | | `-- packages | | | `-- public_html | |-- apple-touch etc... | |-- css | |-- js | |-- img | `-- index.php | |-- fuel | |-- app | | |-- views | | | |-- welcome | | | | |-- index.php | |-- core | `-- packages | `-- public_html |-- apple-touch etc |-- css |-- js |-- img `-- index.php
In this situation, one would add ‘fuel/app/views/welcome/index.php’ to ‘file.pages’ in ‘project.properties’. Or you could add ‘fuel/app/views/**/*.php’ to all PHP files.
- Cannot use different names or structure for /js /css etc
- Cannot use JSLint or JSHint
- Will remove everything in /dev/intermediate and /public_html