Giter VIP home page Giter VIP logo

jake's Introduction

Jake

Jake is a build tool similar to Make and Rake, but written in and for JavaScript. It's a port of Ruby's Rake, which is inspired by the classic [Make](http://en.wikipedia.org/wiki/Make_(software\)) tool.

Currently it runs on the Narwhal server-side JavaScript platform, but is intended to support any compliant CommonJS system as it matures.

API

The API is very similar to the Rake API, though with JavaScript syntax.

  • jake.task(name, [dependencies], [action])

Declares a task called "name", with an optional array of dependent tasks, and optional function to perform.

  • jake.file(path, [dependencies], [action])

Like task, but only runs the action if the target file ("name") doesn't exist or was last modified before at least on dependency.

  • jake.directory(directoryPath)
  • jake.filedir(path, [dependencies], action)

TODO: better API docs

Example "Jakefile"

var jake = require("jake");

// prints "default":
jake.task("default", function(t) {
    print(t.name());
});

// runs tasks "bar" and "baz"
jake.task("foo", ["bar", "baz"]);

// only runs if "bar" is older than "bar.source" or non-existant
jake.file("bar", ["bar.source"], function() {
    // stuff to compile "bar.source" to "bar"
});

// does nothing
jake.task("baz");

Example Usage

# runs "default" task if no task names are given
jake

# runs "bar", "baz" dependent tasks, then "foo" task
jake foo

# runs "bar", "baz", "foo", and "default" tasks
jake foo default

jake's People

Contributors

paulbaumgart avatar tlrobinson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jake's Issues

Regexes cannot be passed to FileList.exclude.

Example of the problem:

> (new JAKE.FileList("*")).exclude(/(^|[\/\\])\.git([\/\\]|$)/)
TypeError: Result of expression 'aFunction.apply' [undefined] is not a function.

paulbaumgart/jake@6f3ac72655 fixes this bug, so instead you get:

> (new JAKE.FileList("*")).exclude(/(^|[\/\\])\.git([\/\\]|$)/)
bin lib LICENSE package.json README.md

Bug: Jake update requires sudo

Steps:

  1. Make sure you are running an outdated version of jake
  2. Run jake (without sudo), jake will ask if you want to update

Result:
Jake will not properly update

Expected:
Jake to properly update without sudo, or to ask for my password when attempting to upgrade

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.