Git Product home page Git Product logo

twitter-flight-rails's Introduction

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 => "[email protected]: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

twitter-flight-rails's People

Contributors

yourabi avatar

Stargazers

Lucas avatar KAZUAKI NAKAMURA avatar BC Broussard avatar Chris Witko avatar  avatar angus croll avatar

Watchers

 avatar James Cloos avatar

twitter-flight-rails's Issues

Rails 4 Compatibility

Rails 4 compatibility would be great.

Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    rails (>= 4.0.0) ruby depends on
      railties (= 4.0.0) ruby

    twitter-flight-rails (>= 0) ruby depends on
      railties (3.1.0)

Instructions

Hi, could you add some more instructions to the README, please.

I'm getting an error:
require_directory argument must be a relative path
(in /Users/fschuetz/.rvm/gems/ruby-1.9.3-p385/gems/twitter-flight-rails-0.0.2/vendor/assets/javascripts/twitter/flight.js:1)

Extracted source (around line #9):

6:
7: <title>Raio</title>
8: <%= stylesheet_link_tag "application", :media => "all" %>
9: <%= javascript_include_tag "application" %>
10: <%= csrf_meta_tags %>
11:
12:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.