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

run by calling node-red script

handles npm start better after both clone and npm pack
This commit is contained in:
Dave Conway-Jones 2018-04-05 23:24:22 +01:00
parent 89f1dedf20
commit 02765f8aad
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4

View File

@ -280,7 +280,7 @@ Project.prototype.update = function (user, data) {
savePackage = true; savePackage = true;
this.package.dependencies = data.dependencies; this.package.dependencies = data.dependencies;
if (this.package.dependencies.hasOwnProperty("node-red")) { if (this.package.dependencies.hasOwnProperty("node-red")) {
this.package.scripts = {"start":"node node_modules/node-red/red.js -u . " + this.package['node-red'].settings.flowFile}; this.package.scripts = {"start":"node-red -u . " + this.package['node-red'].settings.flowFile};
} else { } else {
delete(this.package.scripts.start); delete(this.package.scripts.start);
} }
@ -338,7 +338,7 @@ Project.prototype.update = function (user, data) {
this.paths.flowFile = data.files.flow; this.paths.flowFile = data.files.flow;
this.package['node-red'].settings.flowFile = data.files.flow; this.package['node-red'].settings.flowFile = data.files.flow;
if (this.package.dependencies.hasOwnProperty("node-red")) { if (this.package.dependencies.hasOwnProperty("node-red")) {
this.package.scripts = {"start":"node node_modules/node-red/red.js -u . " + data.files.flow}; this.package.scripts = {"start":"node-red -u . " + data.files.flow};
} else { } else {
delete(this.package.scripts.start); delete(this.package.scripts.start);
} }