1 | [![Build Status](https://travis-ci.org/pandastrike/panda-9000.svg)](https://travis-ci.org/pandastrike/panda-9000)
|
2 |
|
3 | # Introducing The Panda-9000
|
4 |
|
5 | The Panda-9000, or P9K for short, is a task and dependency tool, similar to Gulp, but based on the Fairmont functional reactive programming library.
|
6 |
|
7 | ## Installation
|
8 |
|
9 | ```
|
10 | npm install -g panda-9000
|
11 | ```
|
12 |
|
13 | ## Usage
|
14 |
|
15 | ```
|
16 | p9k [<task-name>...]
|
17 | ```
|
18 |
|
19 | If no arguments are given, the `default` task name is used.
|
20 |
|
21 | Task definitions should be placed in the `tasks/index` directory.
|
22 |
|
23 | ## Defining Tasks
|
24 |
|
25 | To define tasks, place a CoffeeScript or JavaScript file in your project's `task/index.coffee` or `tasks/index.js ` file.
|
26 |
|
27 | For example, here's a simple _hello, world_ task.
|
28 |
|
29 | ```coffee
|
30 | {task} = require "panda-9000"
|
31 |
|
32 | task "hello-world", ->
|
33 | console.log "Hello, World"
|
34 | ```
|
35 |
|
36 | Run the task like this:
|
37 |
|
38 | ```
|
39 | p9k hello-world
|
40 | ```
|
41 |
|
42 | ## Helpers
|
43 |
|
44 | Panda-9000 provides a variety of built-in helpers you can use in tasks.
|
45 | Helpers are designed to be used within reactive flows using the [Fairmont][] FRP library.
|
46 |
|
47 | For example, here's a simple task that will take a list of CoffeeScript files in the `src` directory, compile them, and then write them out to `lib` with a `.js` extension.
|
48 |
|
49 | ```coffee
|
50 | {go, async, map, glob} = require "fairmont"
|
51 | {task, context, coffee, write} = require "panda-9000"
|
52 |
|
53 | task "coffee", async ->
|
54 | go [
|
55 | glob "**/*.coffee", "src"
|
56 | map context
|
57 | tee coffee
|
58 | tee write "lib"
|
59 | ]
|
60 | ```
|
61 |
|
62 | Run the task via the command-line, as before:
|
63 |
|
64 | ```
|
65 | p9k coffee
|
66 | ```
|
67 |
|
68 | See the [API references](#reference) for more details.
|
69 |
|
70 | ## Reactive Programming
|
71 |
|
72 | Panda-9000 tasks are typically defined as reactive flows using the Fairmont FRP library. [You can read the Fairmont wiki to learn more.][Fairmont]
|
73 |
|
74 | ## Status
|
75 |
|
76 | The Panda-9000 is currently `alpha` status, meaning it's under heavy development and not yet suitable for production use.
|
77 |
|
78 | [Fairmont]:https://github.com/pandastrike/fairmont/wiki/Reactive-Programming
|
79 |
|
80 | ## Documentation
|
81 |
|
82 | [See the Panda-9000 wiki to learn more.](https://github.com/pandastrike/panda-9000/wiki)
|