Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fireantjs/fireant
Simple JavaScript Task Runner
https://github.com/fireantjs/fireant
npm npmjs task-runner
Last synced: 3 days ago
JSON representation
Simple JavaScript Task Runner
- Host: GitHub
- URL: https://github.com/fireantjs/fireant
- Owner: fireantjs
- License: mit
- Created: 2017-02-14T15:37:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-22T10:55:07.000Z (over 7 years ago)
- Last Synced: 2024-10-13T08:22:38.223Z (about 1 month ago)
- Topics: npm, npmjs, task-runner
- Language: JavaScript
- Size: 30.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Fireant
JavaScript Task Runner. Less code, everywhere.
## Installation
```shell
npm install -g fireant-cli
npm install -D fireant
touch fireantfile.js
```## Sample fireantfile.js
```javascript
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.
```javascript
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```shell
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 emptyLike this:
```javascript
stylus("css/index.styl").autoprefixer().yourplugin().save("html/css/styles.css");
```Or:
```javascript
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 releaseSee [changelog](https://github.com/fireantjs/fireant/blob/master/CHANGELOG.md) for other changes.
## Thanks
Fireant is inspired by the work of Tero Piirainen on a very early version. Based on [Gulp.js](https://github.com/gulpjs).