Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 80 lines (71 sloc) 4.004 kb
a38f877d »
2011-06-25 Ready for Github push.
1 # See README for additional information.
2 # Written by: Russ Frisch
3 # http://github.com/russfrisch/h5bp-rails
4
5 # Download HTML5 Boilerplate plugins.js (converted to CoffeeScript)
6 get "https://github.com/russfrisch/h5bp-rails/raw/master/assets/plugins.js.coffee", "app/assets/javascripts/plugins.js.coffee"
7
8 # Download and merge HTML5 Boilerplate stylesheet with application.css
9 inside('app/assets/stylesheets/') do
10 FileUtils.rm_rf 'application.css'
93219ce8 »
2011-09-03 Split H5BP Style sheet into two so that user styles are properly wrap…
11 FileUtils.touch 'application.css'
a38f877d »
2011-06-25 Ready for Github push.
12 end
13 prepend_to_file 'app/assets/stylesheets/application.css' do
14 " /*
15 * This is a manifest file that'll automatically include all the stylesheets available in this directory
16 * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
17 * the top of the compiled file, but it's generally better to create a new file per style scope.
93219ce8 »
2011-09-03 Split H5BP Style sheet into two so that user styles are properly wrap…
18 *= require application-pre
a38f877d »
2011-06-25 Ready for Github push.
19 *= require_self
93219ce8 »
2011-09-03 Split H5BP Style sheet into two so that user styles are properly wrap…
20 *= require application-post
a38f877d »
2011-06-25 Ready for Github push.
21 */
22
23 "
24 end
93219ce8 »
2011-09-03 Split H5BP Style sheet into two so that user styles are properly wrap…
25 get "https://github.com/paulirish/html5-boilerplate/raw/master/css/style.css", "app/assets/stylesheets/application-pre.css"
26 get "https://github.com/paulirish/html5-boilerplate/raw/master/css/style.css", "app/assets/stylesheets/application-post.css"
27 gsub_file 'app/assets/stylesheets/application-pre.css', /\/\* ==\|== media queries.* /m, ''
28 gsub_file 'app/assets/stylesheets/application-post.css', /\A.*?(==\|== primary styles).*?(\*\/){1}/m, ''
29 gsub_file 'app/assets/stylesheets/application-pre.css', /==\|==/, '==|==.'
30 gsub_file 'app/assets/stylesheets/application-post.css', /==\|==/, '==|==.'
a38f877d »
2011-06-25 Ready for Github push.
31
32 # Download HTML5 Boilerplate site root assets
33 get "https://github.com/russfrisch/html5-boilerplate/raw/master/apple-touch-icon-114x114-precomposed.png", "public/apple-touch-icon-114x114-precomposed.png"
34 get "https://github.com/russfrisch/html5-boilerplate/raw/master/apple-touch-icon-57x57-precomposed.png", "public/apple-touch-icon-57x57-precomposed.png"
35 get "https://github.com/russfrisch/html5-boilerplate/raw/master/apple-touch-icon-72x72-precomposed.png", "public/apple-touch-icon-72x72-precomposed.png"
36 get "https://github.com/russfrisch/html5-boilerplate/raw/master/apple-touch-icon-precomposed.png", "public/apple-touch-icon-precomposed.png"
37 get "https://github.com/russfrisch/html5-boilerplate/raw/master/apple-touch-icon.png", "public/apple-touch-icon.png"
38 get "https://github.com/russfrisch/html5-boilerplate/raw/master/crossdomain.xml", "public/crossdomain.xml"
39 get "https://github.com/russfrisch/html5-boilerplate/raw/master/humans.txt", "public/humans.txt"
40 get "https://github.com/russfrisch/html5-boilerplate/raw/master/.htaccess", "public/.htaccess"
41
42 # Update application.html.erb with HTML5 Boilerplate index.html content
43 inside('app/views/layouts') do
44 FileUtils.rm_rf 'application.html.erb'
45 end
46 get "https://github.com/russfrisch/html5-boilerplate/raw/master/index.html", "app/views/layouts/application.html.erb"
47 gsub_file 'app/views/layouts/application.html.erb', /<link rel="stylesheet" href="css\/style.css">/ do
48 "<%= stylesheet_link_tag \"application\" %>"
49 end
50 gsub_file 'app/views/layouts/application.html.erb', /<script.*<\/head>/mi do
51 "<%= javascript_include_tag \"modernizr\" %>
52 </head>"
53 end
54 gsub_file 'app/views/layouts/application.html.erb', /<meta charset="utf-8">/ do
55 "<meta charset=\"utf-8\">
56 <%= csrf_meta_tag %>"
57 end
58 gsub_file 'app/views/layouts/application.html.erb', /<div id="container">[\s\S]*<\/div>/, '<%= yield %>'
59 gsub_file 'app/views/layouts/application.html.erb', /<!-- JavaScript[\s\S]*!-- end scripts-->/, '<%= javascript_include_tag "application" %>'
60
0f88ca7a »
2011-06-28 Added commented Heroku deployment requirements
61 # Add Modernizr-Rails dependency to get Modernizr.js support,
62 # optional blueprint-rails, coffeebeans, and Heroku dependencies.
a38f877d »
2011-06-25 Ready for Github push.
63 gsub_file 'Gemfile', /gem 'jquery-rails'/ do
96535047 »
2011-06-27 Adding commented support for blueprint-rails and coffeebeans gems.
64 "# JavasScript libs
65 gem 'jquery-rails'
66 gem 'modernizr-rails'
67
68 # Stylesheet libs
69 # gem 'blueprint-rails'
70
71 # Ajax request CoffeeScript support
0f88ca7a »
2011-06-28 Added commented Heroku deployment requirements
72 # gem 'coffeebeans'
73
74 # Heroku deployment requirements
75 # group :production do
76 # gem 'therubyracer-heroku'
77 # gem 'pg'
78 # end
79 "
a38f877d »
2011-06-25 Ready for Github push.
80 end
Something went wrong with that request. Please try again.