Code Monkey home page Code Monkey logo

coffee-percolator's Introduction

Coffee Percolator

Coffee Percolator is a CoffeeScript CakeFile which allows you to use import directives to easily manage dependancies in your CoffeeScript project.

#import core.base
#import utils.*

class App extends Base
	constructor: -> utils.hello()

Just edit the CakeFile to point to your main source file and it will use topological sort to concatenate and compile all required sources in the correct order.

Syntax

You can define imports using CoffeeScript comments in any .coffee file

#import thing

and import sources from any depth

#import bits.bobs.stuff.thing

or use wildcards to import entire directories

#import stuff.*

and if you prefer slashes to dots, that's fine

#import bits/bobs/stuff/*

Check out the example for a ridiculous hypothetical project that makes use of imports.

Usage

You probably just want the CakeFile, so grab that first

curl -o CakeFile https://raw.github.com/soulwire/Coffee-Percolator/master/CakeFile

then use it in the usual cakey manner: cake {task name}

Currently there are two tasks available, build and watch and you've probably already guessed what they do.

cake build will process your main source and follow all dependancies, concatenate them into a single file in the correct order required to run your app then compile this merged file into JavaScript using the CoffeeScript compiler.

cake watch will watch all source files for changes and invoke the build command when it detects them.

So that's it! It's just a CakeFile - grab the code, add any funky business you like that you would normally use and enjoy CoffeeScripting...

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.