Compare commits
	
		
			4 Commits
		
	
	
		
			7991fb4f29
			...
			1bb68228d8
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 1bb68228d8 | |||
| e3a2028a20 | |||
| 2b2dcd2036 | |||
| 5e6863e4e6 | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					*node-red-contrib-*.tgz
 | 
				
			||||||
							
								
								
									
										22
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,22 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Target to increment the version
 | 
				
			||||||
 | 
					bump-version:
 | 
				
			||||||
 | 
						@jq '.version |= (. | split(".") | .[2] |= (tonumber + 1 | tostring) | join("."))' package.json > package.json.tmp
 | 
				
			||||||
 | 
						@mv package.json.tmp package.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Target to clean old tgz files
 | 
				
			||||||
 | 
					clean:
 | 
				
			||||||
 | 
						@rm -f *.tgz
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					git-commit:
 | 
				
			||||||
 | 
						$(eval NEW_VERSION := $(shell jq -r '.version' package.json))
 | 
				
			||||||
 | 
						@git add .
 | 
				
			||||||
 | 
						@git commit -m "Bump version to $(NEW_VERSION)"
 | 
				
			||||||
 | 
						@git push origin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Target to execute npm pack
 | 
				
			||||||
 | 
					pack: clean bump-version git-commit
 | 
				
			||||||
 | 
						npm pack
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1,9 +1,11 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "@vvzvlad/node-red-contrib-rn-combined-nodes",
 | 
					  "name": "@vvzvlad/node-red-contrib-rn-combined-nodes",
 | 
				
			||||||
  "version": "0.0.1",
 | 
					  "version": "0.0.8",
 | 
				
			||||||
  "description": "",
 | 
					  "description": "",
 | 
				
			||||||
  "main": "index.js",
 | 
					  "main": "index.js",
 | 
				
			||||||
  "keywords": [ "node-red" ],
 | 
					  "keywords": [
 | 
				
			||||||
 | 
					    "node-red"
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "test": "echo \"Error: no test specified\" && exit 1"
 | 
					    "test": "echo \"Error: no test specified\" && exit 1"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,8 @@
 | 
				
			|||||||
<script type="text/javascript">
 | 
					<script type="text/javascript">
 | 
				
			||||||
    RED.nodes.registerType('lower-case',{
 | 
					    RED.nodes.registerType('c-thermostat',{
 | 
				
			||||||
        category: 'function',
 | 
					        category: 'Combined RN',
 | 
				
			||||||
        color: '#a6bbcf',
 | 
					        color: '#a6bbcf',
 | 
				
			||||||
 | 
					        paletteLabel: 'C-Thermostat',
 | 
				
			||||||
        defaults: {
 | 
					        defaults: {
 | 
				
			||||||
            name: {value:""}
 | 
					            name: {value:""}
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
@ -9,18 +10,19 @@
 | 
				
			|||||||
        outputs: 1,
 | 
					        outputs: 1,
 | 
				
			||||||
        icon: "file.svg",
 | 
					        icon: "file.svg",
 | 
				
			||||||
        label: function() {
 | 
					        label: function() {
 | 
				
			||||||
            return this.name||"lower-case";
 | 
					            return this.name||"C-Thermostat";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script type="text/html" data-template-name="lower-case">
 | 
					<script type="text/html" data-template-name="c-thermostat">
 | 
				
			||||||
    <div class="form-row">
 | 
					    <div class="form-row">
 | 
				
			||||||
        <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
 | 
					        <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
 | 
				
			||||||
        <input type="text" id="node-input-name" placeholder="Name">
 | 
					        <input type="text" id="node-input-name" placeholder="Name">
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script type="text/html" data-help-name="lower-case">
 | 
					<script type="text/html" data-help-name="c-thermostat">
 | 
				
			||||||
    <p>A simple node that converts the message payloads into all lower-case characters</p>
 | 
					    <p>c-thermostat/p>
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -7,13 +7,5 @@ module.exports = function(RED) {
 | 
				
			|||||||
            node.send(msg);
 | 
					            node.send(msg);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    RED.nodes.registerType("thermostat",{
 | 
					    RED.nodes.registerType("c-thermostat", thermostat );
 | 
				
			||||||
        "category": "thermostat",
 | 
					 | 
				
			||||||
        "defaults": {
 | 
					 | 
				
			||||||
            name: {
 | 
					 | 
				
			||||||
                value: "C-Thermostat"
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user