node package manager

feri

Feri

The easy to use build tool for web files.

Incrementally clean, build, and watch with little to no configuration required.

Features

  • Clean, Build, and Watch
  • Command Line / API
  • Compile
    • JSX
  • Compile and Minify
    • CoffeeScript
    • Embedded JavaScript (EJS)
    • Jade
    • Less
    • Markdown
    • Pug
    • Sass
    • Stylus
  • Concatenate
  • LiveReload
  • Minify
    • HTML
    • CSS
    • JavaScript
  • Optimize
    • GIF
    • JPG
    • PNG
  • Multilingual
  • Multi-platform
  • Promise Based
  • Source Maps

How It Works

One Source, One Destination

Feri is based on the simple premise of having one source and one destination directory.

Since source and destination folders are linked, cleaning is a breeze. If a destination file does not have a source equivalent, remove the destination file.

Likewise, knowing which source files need to be built is simple. If a source file is missing a destination equivalent, build the source file. If a source file is newer than a destination equivalent, build the source file. If a destination file is newer, no build is needed.

Watching is accomplished by running the appropriate clean or build function in reaction to file system changes. With some added smarts to know that a modified include file should trigger a check all files that may depend on the include for possible rebuilding.

Extension Based

Feri has a plan of action for each file type. CSS files get minified. JPG files are losslessly optimized, and so on. Each extension can have its own unique build process but all files of that type are treated equally. This greatly reduces the complexity when compared to systems which have you define every action to every file, over and over again.

Include Files

Any file prefixed with an underscore ( _ ) is considered an include file. Include files do not get directly published from source to destination but can be included in other files that do.

Preconfigured

Feri comes preconfigured with sensible defaults that get you up and running fast. For some, you'll never have to touch a thing. For others, you'll thrill at how easy it is to make a Feri config file with all your favorite settings. Others still will cackle with mad abandonment once they harness the unrestricted power of Feri's API to make their own wild creations!

Requirements

Node version 5.0.0 or greater.

Install

Install Feri globally for command line use.

npm install -g feri

Install Feri locally in your project's node_modules folder for API use.

npm install feri

Upgrading

Upgrading from Feri 1.x

If you are using EJS includes like include(root + '/absolute/path'), you will need to update all your files to remove the root variable. In the case of the previous example, the new include would look like include('/absolute/path'). This change was necessary since EJS added native support for project root folders.

Command Line

Assuming Feri is installed globally, you can see what command line options are available with:

feri --help

Expanded information is available in the command line documentation.

Custom Config File

If you are using the command line, Feri will look for a file called feri-config.js in the directory you call her from. This file can specify not only which command line options you want enabled, but also control any config API settings.

For example, Feri will clean and build by default but what if you want her to watch too? You could type feri --watch every time you want to work on your project, but where is the fun in that? Activate your inner awesomeness and setup a feri-config.js file like:

// feri-config.js 
module.exports = function(feri) {
    // clean and build are enabled by default 
    feri.config.option.watch = true
}

Now you can type feri and the custom config file will take of the rest! Even better, command line switches still take precedence. That means typing feri --nowatch will temporarily override the config file setting.

Protip: All API documentation features are available to feri-config.js files.

Custom Build Tasks

Feri thinks you should be able to grab nearly any npm module and make a custom build task out of it without too much effort. Are .snazzy files the new CSS hotness? No need to wait for a plugin, you can play with new tech right away.

Extension Specific Information

Additional extension specific information is available for concat files, ejs includes, and gz files.

Edge Cases

An index murder mystery!? Find out more in this melodramatic issue of Edge Cases.

API Documentation

Learn how to leverage Feri's favorite functions in the full API documentation.

Contribute

Looking to contribute? Here are some ideas on how you can help Feri.

  • Are your friends grunting and gulping their way through a broccoli brunch? Tell them about the best non-digestive themed build tool available, Feri.
  • Translate Feri into other languages. Bonus points for Klingon.
  • Report issues on GitHub or post Feri fan art to DeviantArt instead!
  • Pull reqrests to improv spellng in documantations!

License

MIT © Daniel Gagan