Git Product home page Git Product logo

ace-rails-ap's Introduction

ace-rails-ap

The Ajax.org Cloud9 Editor (Ace) for the Rails 3.1+ asset pipeline.

Installation

In your Gemfile, add:

gem 'ace-rails-ap'

Then execute bundle and restart your server.

Add in your application.js file:

//= require ace-rails-ap

To include a theme or mode, add them in your application.js file:

//= require ace/theme-sometheme
//= require ace/mode-somemode

Workers and modes don't need to be included in your application.js file, as they can also be loaded dynamically (see below).

Rails Asset Pipeline

Ace will dynamically load the JavaScript files for workers and modes at run-time.

ace-rails-ap plays nicely with the Rails asset pipeline by automatically configuring the precompilation of the workers and modes, and by setting up Ace to load the fingerprinted files. You have nothing to do, it just works.

Migrate from previous version of ace-rails-ap

You may have done some customisation to allow ace-rails-ap to work in production, such as adding the worker files in assets.precompile of your application.rb and/or using ace.config.setModuleUrl function. You can remove those.

Also replace the previous javascript manifest instruction //= require ace/ace by the new //= require ace-rails-ap, and remove all workers from your javascript manifest.

ace-rails-ap's People

Contributors

codykrieger avatar glaszig avatar hugeen avatar faloi avatar gkop avatar linjunpop avatar captainpete avatar smcgivern avatar mattapayne avatar acrogenesis avatar foliea avatar blaedj avatar fluxsaas avatar randoum avatar muraikenta avatar

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.