1 | var dataflows = require('dataflo.ws');
|
2 | var minimist = require('commop/lib/minimist');
|
3 |
|
4 | var paint = dataflows.color;
|
5 |
|
6 | module.exports = {
|
7 | launchContext: function () {
|
8 | return {
|
9 | method: process.argv[3]
|
10 | };
|
11 | },
|
12 | launchAnyway: function (conf, project) {
|
13 |
|
14 | },
|
15 | setAnyway: function (conf, project, callerContext) {
|
16 | var context = callerContext || this.launchContext();
|
17 | var fixupVars = {};
|
18 | this.args._.shift();
|
19 | this.args._.forEach (function (item, idx, arr) {
|
20 | if (idx % 2)
|
21 | return;
|
22 | fixupVars[item] = [arr[idx + 1]];
|
23 | });
|
24 |
|
25 |
|
26 | project.setVariables (fixupVars, true);
|
27 | },
|
28 | varsAnyway: function (conf, project) {
|
29 | for (var k in project.variables) {
|
30 | console.log (paint.path (k), "\t", project.variables[k][1]);
|
31 | }
|
32 | for (k in project.placeholders) {
|
33 | console.log (paint.path (k), "\t", project.placeholders[k][1]);
|
34 | }
|
35 | },
|
36 | dumpAnyway: function (conf, project) {
|
37 | console.log (conf);
|
38 | }
|
39 | }
|