Skip to content

Instantly share code, notes, and snippets.

@firewalker06
Last active August 29, 2015 14:06
Show Gist options
  • Save firewalker06/1f185854dd461096cdba to your computer and use it in GitHub Desktop.
Save firewalker06/1f185854dd461096cdba to your computer and use it in GitHub Desktop.
ZeptoJS in Rails
#= require zeptojs/src/zepto
#= require zeptojs/src/ajax
#= require zeptojs/src/form
#= require zeptojs/src/event
Zepto ($) ->
console.log("success!")
return
{
"lib": {
"name": "bower-rails generated lib assets",
"dependencies": {
}
},
"vendor": {
"name": "bower-rails generated vendor assets",
"dependencies": {
"zeptojs" : "~1.1.4"
}
}
}
# in config/initializers/bower_rails.rb
BowerRails.configure do |bower_rails|
# Invoke `rake bower:install` automatically before the `rake assets:precompile` task.
bower_rails.install_before_precompile = true
# Invoke `rake bower:resolve` automatically before the `rake assets:precompile` task.
bower_rails.resolve_before_precompile = true
# Don't invoke `rake bower:clean` task because it will deletes other files except described in `main` directives
# bower_rails.clean_before_precompile = true
end
gem "bower-rails", "~> 0.8.3"
# To generate bower_rails config and bower.json files
$ rails g bower_rails:initialize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment