Skip to content

Instantly share code, notes, and snippets.

// Generated by CoffeeScript 1.9.1
(function() {
var program;
program = require('commander')
.option('--flag1 [true/false]', 'Flag1 (default = false)', false)
.option('--flag2 [true/false]', 'Flag2 (default = false)', (function(val) {
return val === "true";
}), false)
.parse(process.argv);
diff --git a/src/noflo-nodejs.coffee b/src/noflo-nodejs.coffee
index 923da82..7fe4019 100644
--- a/src/noflo-nodejs.coffee
+++ b/src/noflo-nodejs.coffee
@@ -60,7 +60,6 @@ require 'coffee-cache' if program.cache
stored = lib.getStored program
baseDir = process.env.PROJECT_HOME or process.cwd()
-interval = 10 * 60 * 1000
if !stored.id
@ensonic
ensonic / gist:5a4d727cbc6f5fc36655
Last active August 29, 2015 14:20
commander pitfalls, try coffee ./test.coffee --flag1 false
#!/usr/bin/env node
program = require 'commander'
program
.option('--flag1 [true/false]', 'Flag1 (default = false)', false)
.option('--flag2 [true/false]', 'Flag2 (default = false)', ((val) -> (val is "true")), false)
.parse process.argv
# value is a string if given
#!/usr/bin/env node
program = require 'commander'
http = require 'http'
noflo = require 'noflo'
runtime = require 'noflo-runtime-websocket'
querystring = require 'querystring'
program
.option('--host <hostname>', 'Hostname or IP for the runtime.', '127.0.0.1')
.option('--port <port>', 'Port for the runtime', parseInt, '3569')
From c85dac7bcc1ceec84751d3b1927428ece90cd52f Mon Sep 17 00:00:00 2001
From: Stefan Sauer <[email protected]>
Date: Fri, 12 Sep 2014 14:42:23 +0200
Subject: [PATCH] info: avoid global variable
Use user_data to pass the log_file handle to the logger-function.
RFC: when calling gst_debug_add_log_function(NULL, user_data, cleanup)
we will implicity use gst_debug_log_default() again, but now can't
ensure user_data.
$/usr/local/lib/node_modules/noflo:> noflo ./examples/helloworld/hello.fbp
/usr/local/lib/node_modules/noflo/lib/ComponentLoader.js:140
throw new Error("Component " + name + " not available with base " +
^
Error: Component Output not available with base /usr/local/lib/node_modules/noflo
at ComponentLoader.load (/usr/local/lib/node_modules/noflo/lib/ComponentLoader.js:140:17)
at Network.load (/usr/local/lib/node_modules/noflo/lib/Network.js:93:26)
at Network.addNode (/usr/local/lib/node_modules/noflo/lib/Network.js:114:19)
at /usr/local/lib/node_modules/noflo/lib/Network.js:199:39