digitalnodecom / node-red-contrib-generic-s3

Generic S3 nodes for use in Node-RED
https://www.npmjs.com/package/@digitalnodecom/node-red-contrib-generic-s3
Apache License 2.0
3 stars 5 forks source link

Automate development #54

Closed rristov60 closed 9 months ago

rristov60 commented 11 months ago

Currently devs don't really have the option to automatically deploy the changes they make to node-RED. They need to manually install the nodes with npm install /PATH/TO/NODES/node-red-contrib-generic-s3 and then restart node-RED. It would be nice for addition of npm run dev which will take care of this process automatically, perhaps even watch the files.

trajche commented 11 months ago

The way I do this is with nodemon. Add the following to package.json:

"scripts": {
    "watch": "nodemon -e js,html,json --watch . -x \"rm -r /Users/$USER/.node-red/node_modules/@digitalnodecom/${PWD##*/} && npm install --prefix /Users/$USER/.node-red --save ./ --force && node-red\""
},
rristov60 commented 11 months ago

Awesome, exactly the same can be used here. I will just take a look how can we differentiate UNIX style OSes vs Windows, so Windows users don't have an issue with this.

rristov60 commented 9 months ago

@trajche Thank you for the code snippet! There is a new commit to the main, which adds nodemon with your code for UNIX like systems. I will close this issue now and open a new one for development automation on Windows. Although the change is in the codebase, a separate release won't be created for this.