mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Created Design: external file for function and templates nodes (markdown)
parent
b5653eef41
commit
b403772de1
11
Design:-external-file-for-function-and-templates-nodes.md
Normal file
11
Design:-external-file-for-function-and-templates-nodes.md
Normal file
@ -0,0 +1,11 @@
|
||||
# Node-RED: External file proposal
|
||||
## The problem
|
||||
Currently, the 3 code centric nodes (`function`, `template` and `ui-template`) load their code from a window within the node’s configuration page. While this approach works fine for small single-person projects, it gets complicated in a multi-user project hosted on GIT.
|
||||
|
||||
Doing diffs and merging flow files with a large number of functions or templates is a manual process now. This could be improved greatly if there was an option, in addition to the current mechanism, to load the code content of these nodes from a file on the user’s file system.
|
||||
|
||||
## Proposition
|
||||
We propose the addition of a checkbox named `Load from external file` just above the code field. Checking this checkbox would make a field appear where the user can type the path to a file, similar to the `file-in` node. Given the fact some cloud environment are not compatible with a traditional file system, a setting named `allowExternalFiles` could be added in `settings.js` to disable this feature entirely.
|
||||
|
||||
## Exporting flows
|
||||
This brings one problem, what happens when someone exports a flow ? We propose the addition of a checkbox in the flow export dialog named `Embed external files` that would embed the external file contents within the exported flow making sharing of that flow possible.
|
Loading…
Reference in New Issue
Block a user