Skip to content

Commit

Permalink
wt 1.0 changes
Browse files Browse the repository at this point in the history
- adds subcommand (hardcoded to watch, but should also add serve and
  compile)
- multichar cli arguments require double dash --
  • Loading branch information
drewwells committed Aug 17, 2015
1 parent 1427bc3 commit cf3d7ba
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tasks/lib/wellington.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,15 @@ exports.init = function (grunt) {

// build the array of arguments to build the wt command
exports.buildArgsArray = function (options, files) {
var args = [];
var args = ['watch'];

This comment has been minimized.

Copy link
@andystalick

andystalick Aug 18, 2015

Contributor

What are the consequences of having a hardcoded argument in here? Kinda seems like it ought to be "compile" if anything.

This comment has been minimized.

Copy link
@drewwells

drewwells Aug 19, 2015

Author Member

It should depend on the grunt task. grunt watch should call wellington watch to take benefit of doing partial sass compiles and file watching. A grunt compile task should do a single compile then die.


for (var key in options) {
if (options.key != "") {
args.push("-"+key);
if (key.length>1) {
args.push("--"+key);
} else {
args.push("-"+key);
}
// Special parser for Go booleans
if (options[key] != "") {
args.push(options[key]);
Expand Down

0 comments on commit cf3d7ba

Please sign in to comment.