Code Monkey home page Code Monkey logo

coffee-machine's Introduction

CoffeeMachine

These are some scripts I hacked together to work with CoffeeScript.

This is a first draft. Your mileage may vary.

Installing

  • You'll need Ruby 1.9.2. Using RVM is advised.

  • You can make a submodule to this in your own project:

    git submodule add [email protected]:iain/coffee-machine.git vendor/coffee-machine
    git submodule update --init
    
  • Create a file called Thorfile and add:

    load File.expand_path('../vendor/coffee-machine/thor.rb', __FILE__)
    
  • Create a file called Gemfile and add the contents of the Gemfile in this repository.

  • Install the dependencies:

    gem install bundler
    bundle install
    

Compiling

Compiling is done according to naming conventions. This is not yet configurable.

Loose scripts are expected to be in src/myscript.coffee and are compiled to public/myscript.js.

Any coffee files in subdirectories and are concatinated. So src/mymodule/*.coffee are compiled into public/mymodule.js

To compile everything run:

thor coffee:compile

You can compile loose files too:

thor coffee:compile src/myfile.coffee

Start a watcher, to compile whenever you save a file:

thor coffee:watch

AutoRefresh

Using the AutoRefresh gem, everytime you change a file in the public directory, the browser will reload. You need to add some scripts to your page, so be sure to checkout the documentation.


(c) Iain Hecker, 2011. Released under the MIT-License. Look it up yourself.

coffee-machine's People

Contributors

iain avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.