-
Notifications
You must be signed in to change notification settings - Fork 0
Warhorse Configuration
Kyle Alexis Sargeant edited this page Jun 5, 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.
This file has two sections. One for 'commands' configuration and the other for miscellaneous 'tasks'.
For example, the build command for a typical node module project might look like:-
"build": function() {
warhorse.bundle("js", {
src: "src/index.js",
dst: "dist/index.js"
});
warhorse.minify("js", {
src: "dist/index.js",
dst: "dist/index.min.js"
});
},But if you didn't want minification then you could just drop it out like:-
"build": function() {
warhorse.bundle("js", {
src: "src/index.js",
dst: "dist/index.js"
});
},But then, you realise that you want debugging (and or source-maps) - so you could add the 'debug' flag like:-
"build": function() {
warhorse.bundle("js", {
src: "src/index.js",
dst: "dist/index.js",
debug: true
});
},All commands are defined in the same way. And all tasks have a core set of standard configuration options:-
- conf
- src
- dst
- debug