Makes it simple to include the anime.js library in the Rails asset pipeline.
var myAnimation = anime({
targets: ['.blue', '.green'],
translateX: '13rem',
rotate: 180,
borderRadius: 8,
duration: 2000,
loop: true
});
Add this line to your application's Gemfile:
gem 'anime_js_rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install anime_js_rails
#app/assets/javascript/application.js
//= require anime
#config/initializers/assets.rb
Rails.application.config.assets.precompile += %w( anime.js )
#or
Rails.application.config.assets.precompile += [/.*\.js/,/.*\.css/]
- Star it
- Fork it ( https://github.com/guinslym/anime_js_rails )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request