update according to comments

This commit is contained in:
Hiroyasu Nishiyama
2020-05-11 14:37:14 +09:00
parent c649e1b4a2
commit 5b197adf33
7 changed files with 69 additions and 29 deletions

View File

@@ -21,7 +21,7 @@
the body of the message.</p>
<p>The function is expected to return a message object (or multiple message objects), but can choose
to return nothing in order to halt a flow.</p>
<p>Setup code executed before deploy can be specified in <b>Setup</b> tab. Also, cleanup code executed before flow shutdown can be specified in <b>Cleanup</b> tab.</p>
<p>Setup code executed once whenever Node-RED is started or a new flow configuration is deployed can be specified in <b>Setup</b> tab. Also, cleanup code executed when the node is being stopped or re-deployed can be specified in <b>Close</b> tab.</p>
<h3>Details</h3>
<p>See the <a target="_blank" href="http://nodered.org/docs/writing-functions.html">online documentation</a>
for more information on writing functions.</p>

View File

@@ -208,9 +208,13 @@
"label": {
"function": "Function",
"initialize": "Setup",
"finalize": "Cleanup",
"finalize": "Close",
"outputs": "Outputs"
},
"text": {
"initialize": "// Code added here will be run once whenever Node-RED is started\n// or a new flow configuration is deployed.\n",
"finalize": "// Code added here will be run when the node is being stopped\n// or re-deployed.\n"
},
"error": {
"inputListener":"Cannot add listener to 'input' event within Function",
"non-message-returned":"Function tried to send a message of type __type__"

View File

@@ -19,7 +19,7 @@
<p>入力メッセージは<code>msg</code>JavaScript</p>
<p><code>msg</code><code>msg.payload</code></p>
<p>通常コードはメッセージオブジェクト(もしくは複数のメッセージオブジェクト)を返却します後続フローの実行を停止したい場合はオブジェクトを返却しなくてもかまいません</p>
<p>デプロイ前に実行すべき初期化コードを<b>初期化処理</b><b></b></p>
<p>Node-REDの開始時もしくはフローの設定をデプロイした際実行される初期化コードを<b>初期化処理</b><b></b></p>
<h3>詳細</h3>
<p>コードの書き方の詳細については<a target="_blank" href="http://nodered.org/docs/writing-functions.html">オンラインドキュメント</a></p>
<h4>メッセージの送信</h4>

View File

@@ -211,6 +211,10 @@
"finalize": "終了処理",
"outputs": "出力数"
},
"text": {
"initialize": "// ここに記述したコードはNode-REDの実行開始時\n// もしくは新しいフローのデプロイ時に一度だけ実行されます。\n",
"finalize": "// ここに記述したコードはノードの停止時\n// もしくは再デプロイ時に実行されます。\n"
},
"error": {
"inputListener": "コード内で'input'イベントのリスナを設定できません",
"non-message-returned": "Functionードが __type__ 型のメッセージ送信を試みました"