Skip to content

Instantly share code, notes, and snippets.

@spion
Last active January 4, 2016 20:29
Show Gist options
  • Select an option

  • Save spion/8673903 to your computer and use it in GitHub Desktop.

Select an option

Save spion/8673903 to your computer and use it in GitHub Desktop.
var fez = require("../../src/main.js"),
less = require("fez-less"),
clean = require("fez-clean-css"),
concat = require("fez-concat");
// Example starting files:
// css/reset.css; main.less; mobile.less
exports.build = function(spec) {
spec.with("dist/*.min.css").all(function(files) {
spec.rule(files.array(), "dist.min.css", concat());
});
spec.with("css/*.css").each(function(file) {
spec.rule(file.name(), fez.mapFile("dist/%f.min.css"), clean());
});
spec.with("*.less").each(function(file) {
spec.rule(file.name(), fez.mapFile("css/%f.css"), less());
});
};
exports.default = exports.build;
fez(module);
@spion
Copy link
Copy Markdown
Author

spion commented Jan 28, 2014

example graph

@spion
Copy link
Copy Markdown
Author

spion commented Jan 28, 2014

So what happens here is

at the first iteration, fez applies all the globs to the real filesystem and gets 3 files, as well as the operations they need to generate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment