Skip to content
This repository has been archived by the owner on Mar 16, 2018. It is now read-only.

Use kaffee

FabianM edited this page Oct 13, 2012 · 3 revisions

This article will explain how to setup Kaffee for your project.

Configuring your project

Kaffee actually uses the package.json file as project configuration file. You can configure your project by adding an object with the name kaffee to your project configuration file (as shown below):

{ 
    "name" : "myapp",
    "version" : "0.0.1",
    "kaffee" : {
        "plugins" : { "kaffee-coffeemaker" : {} }
        "archtype" : "kaffee-coffeemaker"
    }
}

This is a very basic example of a Kaffee project configuration file.

Directory structure

Kaffee uses a different directory structure than most other major Nodejs project. Most archtypes uses the structure below, although it is possible to change it.

  • src/
    • main/ - Contains the main source code.
    • test/ - Contains the test cases.
    • resources/ - Contains the main resources
    • testResources/ - Contains the resources for the tests.

Building your project

In-case you are using the kaffee-coffeemaker plugin, you can run (make sure your current directory is your project, by using cd):

kaffee compile

This will compile all Coffeescript files into Javascript files.