0.0.14 • Published 7 years ago

fireant v0.0.14

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Fireant

JavaScript Task Runner. Less code, everywhere.

Installation

npm install -g fireant-cli
npm install -D fireant
touch fireantfile.js

Sample fireantfile.js

var fireant = require("fireant");
var stylus = require("fireant-stylus");

// Tasks
fireant.task("watch", function() {
	fireant.watch("css/*.styl", function(file) {
    	stylus("css/index.styl").save("html/css/styles.css");
	});
});

Sample fireantfile.js with options

Fireant uses global options for plugins.

var fireant = require("fireant");
var stylus = require("fireant-stylus");
var uglify = require("fireant-uglify");
var global = require("global");

// Options
global.options = { 
    stylus: {
        minify: {
            disabled: false, // set to true to disable minify
            compatibility: "ie9",
            keepBreaks: false,
            keepSpecialComments: 0,
            mediaMerging: true,
            sourceMap: false
        },
        autoprefixer: {
            disabled: false, // set to true to disable autoprefixer
            browsers: ["last 2 versions"]
        }
    },
    uglify: {
        preserveComments: false,
        compress: true,
        mangle: true
    }
};

// Tasks
fireant.task("watch", function() {
	fireant.watch("css/*.styl", function(file) {
    	stylus("css/index.styl").save("html/css/styles.css");
	});

	fireant.watch("js/*.js", function(file) {
		uglify([
            "js/common.js",
            "js/app.js"
        ]).save("html/js/common.min.js");
    });
});

Usage

fire [tasks]

Contributing

Please do.

When developing plugins, keep in mind that every plugin should:

  • be able to receive a file name (or an array of filenames) as first argument — or —
  • get the result (string) from previous method if the argument is empty

Like this:

stylus("css/index.styl").autoprefixer().yourplugin().save("html/css/styles.css");

Or:

autoprefixer("css/index.styl").yourplugin().save("html/css/styles.css");

Release history

  • 0.0.13 - Fireant looks for changes in fireantfile.js and reloads the file
  • 0.0.12 - Press "q" to stop Fireant
  • 0.0.1 - Initial release

See changelog for other changes.

Thanks

Fireant is inspired by the work of Tero Piirainen on a very early version. Based on Gulp.js.

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago