Skip to content

Instantly share code, notes, and snippets.

@knomedia
Forked from steveklabnik/ember_template.rb
Last active December 26, 2015 09:09
Show Gist options
  • Save knomedia/7127550 to your computer and use it in GitHub Desktop.
Save knomedia/7127550 to your computer and use it in GitHub Desktop.
An ember template for rails with ember-tools
run "sed -i.bck '/turbolinks/d' Gemfile"
run "sed -i.bck 's/, \"data-turbolinks-track\" => true//' app/views/layouts/application.html.erb"
run "sed -i.bck '/turbolinks/d' app/assets/javascripts/application.js"
run "sed -i.bck '/coffee/d' Gemfile"
run "sed -i.bck '/jbuilder/d' Gemfile"
gem 'active_model_serializers'
run "sed -i.bck '/tree/d' app/assets/javascripts/application.js"
run "ember create --js-path lib/assets/javascripts"
run "mv index.html public/."
run "sed -i.bck '/script/c\\
\\ \\ <script src=\"javascripts/application.js\"></script>
' public/index.html"
run "rm public/index.html.bck"
run "rm Gemfile.bck"
run "rm app/assets/javascripts/application.js.bck"
run "rm app/views/layouts/application.html.erb.bck"
run "mkdir -p public/javascripts/"
run "ember build --out-file public/javascripts/application.js"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment