BakeJS is a project designed to ease the pain and complexity of creating client-side Javascript applications. It takes a similar approach to homebrew in that it uses a github repository to define a number of recipes for building various JS libraries.


To get started with BakeJS first install the command line tools via npm. If you don’t already have NodeJS installed then you will need to install it to get access to npm.:

npm install -g bake-js

Depending on your installation, you may need to run this with the ``sudo`` command.

Once BakeJS is installed, you will then be able to access the bake command. First thing you will want to do is fetch the current recipes from this github repo by running the update command:

bake update

If everything has gone to plan, you should see the following output:

retrieving recipes from
extracting recipes
✓ done

The update command here performs the same task as brew update, except that bake downloads the latest .tar.gz of a bakery repo from github rather than interfacing with git. General intention is that while the process will be less optimal with regards to bandwidth it is something that should work natively in Windows.

Baking your Application

Using BakeJS to generate an application file that is packaged with your application dependencies all into a single file is very simple.

The following is an example of how you might create an application that has dependencies on both backbone and eve:

// dep: backbone, eve

var myApp = (function() {
    // your app code here...

Then run bake against your target file:

bake examples/test.js

When run the dependencies are analysed, child dependencies resolved (e.g. underscore is specified as a dependency in the backbone recipe and then all required files are pulled down from their remote sources and pushed to the start of the resulting output.

The resulting file is then output to a dist folder (by default).

Indices and tables

Table Of Contents

Next topic

Writing Recipes

This Page

Fork me on GitHub