File tree Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " node-red-contrib-rsync" ,
3
+ "version" : " 1.0.0" ,
4
+ "description" : " Node Red wrapper for rsync" ,
5
+ "main" : " rsync-wrapper.js" ,
6
+ "scripts" : {
7
+ "test" : " echo \" No test specified\" "
8
+ },
9
+ "repository" : {
10
+ "type" : " git" ,
11
+ "url" : " git+https://github.com/michaelblight/node-red-contrib-rsync.git"
12
+ },
13
+ "keywords" : [
14
+ " node" ,
15
+ " red" ,
16
+ " rsync"
17
+ ],
18
+ "author" : " Michael Blight" ,
19
+ "license" : " Apache-2.0" ,
20
+ "bugs" : {
21
+ "url" : " https://github.com/michaelblight/node-red-contrib-rsync/issues"
22
+ },
23
+ "homepage" : " https://github.com/michaelblight/node-red-contrib-rsync#readme"
24
+ }
Original file line number Diff line number Diff line change
1
+ < script type ="text/javascript ">
2
+ RED . nodes . registerType ( 'rsync' , {
3
+ category : 'function' ,
4
+ color : '#a6bbcf' ,
5
+ defaults : {
6
+ name : { value : "" }
7
+ } ,
8
+ inputs : 1 ,
9
+ outputs : 1 ,
10
+ icon : "file.png" ,
11
+ label : function ( ) {
12
+ return this . name || "rsync" ;
13
+ }
14
+ } ) ;
15
+ </ script >
16
+
17
+ < script type ="text/x-red " data-template-name ="rsync ">
18
+ < div class = "form-row" >
19
+ < label for = "node-input-name" > < i class = "icon-tag" > </ i > Name</ label >
20
+ < input type = "text" id = "node-input-name" placeholder = "Name" >
21
+ </ div >
22
+ </ script >
23
+
24
+ < script type ="text/x-red " data-help-name ="rsync ">
25
+ < p > A node that uses rsyncwrapper to call rsync.</ p >
26
+ </ script >
Original file line number Diff line number Diff line change
1
+ module . exports = function ( RED ) {
2
+ function rsyncNode ( config ) {
3
+ RED . nodes . createNode ( this , config ) ;
4
+ var node = this ;
5
+ node . on ( 'input' , function ( msg ) {
6
+ msg . payload = msg . payload . toLowerCase ( ) ;
7
+ node . send ( msg ) ;
8
+ } ) ;
9
+ }
10
+ RED . nodes . registerType ( "rsync" , rsyncNode ) ;
11
+ }
You can’t perform that action at this time.
0 commit comments