No commit activity in last 3 years
No release in over 3 years
twitter-flight-rails flight framework for Rails asset pipeline
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 3.1

Runtime

>= 2.2.1
>= 3.1
 Project Readme

Twitter Flight framework for Rails

This asset gem packages the twitter flight framework for Rails.

Installation

Add this line to your application's Gemfile:

gem 'twitter-flight-rails'

or

gem 'twitter-flight-rails', :git => "git@github.com:yourabi/twitter-flight-rails.git"

You'll also want to add the following dependencies to your Gemfile (see the dependencies section for more details)

gem 'requirejs-rails'

gem 'es5-shim-rails'

And then execute:

$ bundle

Dependencies

Twitter flight depdends on ES5-shim, jQuery and an AMD implementation like require.js.

One possible Rails/Require.js integration is requirejs-rails ... you'll probably want to read their documentation and follow their initial setup instructions.

ES5-shim is used to polyfill ES5 support for older browsers and JQuery for DOM manipulation API. This is provided by the es5-shim-rails gem.

Usage

Eventually you'll end up using require.js to include jquery, es5-shim, flight and your own compnents using something like this

  // here "root" is a file that contains your own components under app/assets/javascripts/root.js and accessed at /assets/root.js
  require(['jquery', 'es5-shim/shims/es5-shim', 'es5-shim/shims/es5-sham', 'twitter/flight/', 'root'], function($) {

    // this is your own boot.js file in app/assets/javascripts/boot.js accessed at /assets/boot.js
    require(['boot'], function(initialize) {
      initialize();
    });

  });

Changelog

Currently this version tracks flight v1.0.2 with a few bugs backported from master ($.browser reference in jQuery 1.9) and paths tweaked slightly.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request