1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Update all core nodes to use NODE_RED_HOME rather than relative paths

This commit is contained in:
Nicholas O'Leary 2013-11-14 15:44:54 +00:00
parent 82b863805d
commit affcc8ae65
30 changed files with 32 additions and 32 deletions

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var sentiment = require('sentiment');
function SentimentNode(n) {

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var util = require("util");
var parseString = require('xml2js').parseString;
var gotEyes = false;

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var js2xmlparser = require("js2xmlparser");
function Js2XmlNode(n) {

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
try {
var cron = require("cron");
} catch(err) {

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var util = require("util");
var ws = require('ws');

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var spawn = require('child_process').spawn;
var exec = require('child_process').exec;

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var util = require("util");
var vm = require("vm");

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var mustache = require("mustache");
var util = require("util");

View File

@ -17,7 +17,7 @@
//Simple node to introduce a pause into a flow
//Require main module
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var node;

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
function CommentNode(n) {
RED.nodes.createNode(this,n);

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var util = require("util");
var firmata = require("firmata");
var arduinoReady = false;

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var util = require("util");
var exec = require('child_process').exec;
var fs = require('fs');

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var connectionPool = require("./lib/mqttConnectionPool");
var util = require("util");

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var util = require("util");
var http = require("http");
var https = require("https");

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var notify = require("fs.notify");
function WatchNode(n) {

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var settings = RED.settings;
var events = require("events");
var util = require("util");

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var reconnectTime = RED.settings.socketReconnectTime||10000;
var net = require('net');

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var dgram = require('dgram');
// The Input Node

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
function HttpGet(n) {
RED.nodes.createNode(this,n);

View File

@ -15,7 +15,7 @@
**/
var util = require("util");
var mqtt = require("./mqtt");
var settings = require("../../../red/red").settings;
var settings = require(process.env.NODE_RED_HOME+"/red/red").settings;
var connections = {};

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var operators = {
'eq':function(a,b) { return a == b; },

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var ntwitter = require('ntwitter');
var OAuth= require('oauth').OAuth;

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var FeedParser = require("feedparser");
var request = require("request");

View File

@ -14,9 +14,9 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var nodemailer = require("nodemailer");
var emailkey = require("../../../emailkeys.js");
var emailkey = require(process.env.NODE_RED_HOME+"/../emailkeys.js");
var smtpTransport = nodemailer.createTransport("SMTP",{
service: emailkey.service,

View File

@ -14,13 +14,13 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var Imap = require('imap');
var util = require('util');
var oldmail = {};
try {
var emailkey = RED.settings.email || require("../../../emailkeys.js");
var emailkey = RED.settings.email || require(process.env.NODE_RED_HOME+"/../emailkeys.js");
} catch(err) {
throw new Error("Failed to load Email credentials");
}

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var irc = require("irc");
var util = require("util");

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var fs = require("fs");
var spawn = require('child_process').spawn;

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var fs = require("fs");
function FileNode(n) {

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var util = require("util");
var redis = require("redis");

View File

@ -14,7 +14,7 @@
* limitations under the License.
**/
var RED = require("../../red/red");
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var mongo = require('mongodb');
function MongoNode(n) {