Created
April 23, 2014 10:53
-
-
Save jackcallister/11210672 to your computer and use it in GitHub Desktop.
Turn Rails into a SPA generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :app do | |
desc "Build static distrubution" | |
task :build do | |
puts "Building..." | |
# Shell out for now... | |
`bundle exec rake assets:clean` | |
puts "Compiling" | |
`bundle exec rake assets:precompile` | |
puts "Starting web get" | |
`wget -m localhost:3001 --directory-prefix=dist --no-host-directories` | |
puts "Copying assets" | |
`cp -r public/assets dist/assets` | |
puts "Cleaning" | |
`bundle exec rake assets:clean` | |
puts "Done" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just load up your ember app into the root controller action and you're good to go. Also install
wget
http://osxdaily.com/2012/05/22/install-wget-mac-os-x/