I think we all trying to steer you into not creating a fork of the gate node for something that can be accomplished with existing nodes in an acceptable manner
It's the Node-RED way of doing things
I think we all trying to steer you into not creating a fork of the gate node for something that can be accomplished with existing nodes in an acceptable manner
It's the Node-RED way of doing things
... but as a learning exercise it is a perfectly valid thing to do... and not to be discouraged...
(just preferably don't publish it to npm - or if you do - remove the "node-red" tag from the package.json first)
That's not so obvious to me. Can't I just copy the .node-red\node_modules\node-red-contrib-simple-gate folder to another location and then do "npm install" on that directory after I've changed the code and title?
Understood, but I plan on doing the above so it stays local.
I did this myself with one specific node I wanted to have some special features in. The author did not feel especially keen or comfortable about them but I really wanted them.
No problem to change the code if you are skilled enough. So I did, and kept an additional local copy of both the original and the hack. Proud and happy, working great, but...
First of all I was also eager to have & benefit from new version the author published. Now and forever. So instead of what you plan to do, I edited every new version and added my personal features. Every time a new version was released.
This is still possible to do but for me, this is not my favorite interest. So best is if you can convince the author but I guess you have already tried. If unsuccessful you have no choice, just do it, it's also a good exercise as already mentioned
Thanks, I appreciate the encouragement. While I have no experience programming with JS I was an avid programmer in quite a few environments with many languages before I retired. That was over 10 years ago and I've done very little since so to say I'm rusty is an understatement. But I'm sure I can figure it out...eventually.
I'll search this community and the web for needed tidbits and post on this topic if I can't find what I need.
It would be better to fork the original repository on github and start a branch on your fork, and make the changes there, installing to your system from your repository. Then if the original is updated you can bring your fork up to date and move your branch to the new head and if there are no conflicting changes it will continue to work.
Good point. But I don't lose anything if I do a local copy to get it working and then do as you say and cut&paste my changes to the cloned repo, right? I've never used github for other than installing packages from so I'll have to learn about that. I'm sure it's not hard but it is one more thing before knowing if I like what I come up with. And if not I won't need to know how to do the github thing yet. This old brain seems to have only so much storage and everything I push in pushes something else out.
To wrap up this topic I'm pleased to report that I have a working gate with the 2 outputs. It took me until last night to get a round tuit but it only took about an hour. Rather than refer back to the guidance provided by @cymplecy I struck out on my own just for the satisfaction of the accomplishment. I wound up with what @cymplecy provided with his guidance plus a few other things (color, output labels, etc.) again for the learning.
Thanks to all here for your support and guidance.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.