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:
parent
89f1dedf20
commit
02765f8aad
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user