-
-
Save Raynos/8230606 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// don't pass monk in as an argument, just require it | |
var monk = require("monk") | |
var rule = require("monk/rule") | |
var less = require("monk-less"); | |
var compress = require("monk-compress") | |
// don't exports.x = bar | |
// just create functions. | |
function build() { | |
// don't have magic glob or mapFile. Just have sensible defaults | |
// in your string DSL. | |
// alternatively | |
// var glob = require("monk/glob"), explode = require("monk/explode") | |
// rule(glob("*.less"), explode("css/%f.css"), less()) | |
rule("*.less", "css/%f.css", less()) | |
} | |
function dist() { | |
rule("css/*.css", ["dist.bz2", "dist.tar.gz"], compress()) | |
} | |
// export a single thing, a list of two tasks | |
// the all task is considered 'default' like make. | |
module.exports = { | |
build: build, | |
dist: dist, | |
all: build | |
} | |
if (require.main === module) { | |
monk(module.exports); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment