GithubHelp home page GithubHelp logo

fancy-lang / fake Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 180 KB

Fake - Fancy automation & build tool

Home Page: http://www.fancy-lang.org

License: BSD 3-Clause "New" or "Revised" License

Fancy 99.01% Ruby 0.99%

fake's Introduction

Fake - Fancy Make

Fake is a build and automation tool for Fancy, similar to Ruby's Rake. You write your tasks in pure Fancy code, by default saving them to Fakefiles.

A standard collection of common Fake tasks will be added soon.

Installation

To install Fake use Fancy's built-in package system:

$ fancy install fancy-lang/fake

Also make sure that ~/.fancy/packages/bin is in your $PATH environment variable. Set it in your ~/.bash_profile or similar:

export PATH=$PATH:~/.fancy/packages/bin

Tasks

Fake allows the definition of tasks that may depend on other tasks to complete.

Given a Fakefile with the following contents:

Fake tasks: {
  clean: {
    desc: "Remove all *.fyc files"
    run: {
      sh: ("rm", "-rf", Directory list: "**/*.fyc") verbose: true
    }
  }
}

You can invoke it like so:

$ fake clean

To list all available tasks run:

$ fake -T
fake clean    |  Remove all *.fyc files

To see a list of general options use the help command:

$ fake --help

Namespaces

You can place tasks in namespaces by placing them inside a named block that doesn't contain its own run option:

Fake tasks: {
  namespace_a: {
    task_a: {
      run: {
        # ...
      }
    }
  }

  namespace_b: {
    task_b: {
      depends: 'namespace_a:task_a
      run: {
        # ...
      }
    }
  }
}

Specifying dependencies

You can specify dependencies via the depends option, like so:

Fake tasks: {
  task_a: {
    desc: "This task shall be run before task_b"
    run: {
      "Running task a" println
    }
  }

  task_b: {
    desc: "This tasks depends on task_a"
    depends: 'task_a # pass an array of task names if you depend on more than one task
    run: {
      "Running task b" println
    }
  }
}

When no task is specified the default task will be run (as with Rake).

Note:

This is still in the making. More features are coming soon, but defining basic tasks and dependencies between them works already.

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.