Skip to content

Warhorse Configuration

Kyle Alexis Sargeant edited this page May 27, 2017 · 2 revisions

Warhorse has a single configuration script. After a standard install, it can be found in the project's ./bin/ directory:

_warhorse.js

In this file is the skeleton of Warhorse's configuration - which can be modified to suit your needs - or left, as is, if you require nothing special.

For example, the build task looks like this:

warhorse.task("build", function() {
    warhorse.load("./src/js/**/*.js", function(file) {
        warhorse.bundle(file, function(file) {
            warhorse.save(file, "./dist/js/");
        });    
    });
});

If you wished to change Warhorse bundling default - and NOT use minification - then you can add a config to the bundle call like:-

warhorse.task("build", function() {
    warhorse.load("./src/js/**/*.js", function(file) {
        warhorse.bundle(file, function(file) {
            warhorse.save(file, "./dist/js/");
        },{
            minify: false
        });    
    });
});

Clone this wiki locally