Skip to content

Commit 2d2f5ba

Browse files
author
Ke, Mingze
committed
Added package.json
1 parent 22534b7 commit 2d2f5ba

4 files changed

Lines changed: 47 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
global.webduino = require('webduino-js');
2+
require('./webduino-blockly')(global);

package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "webduino-blockly",
3+
"version": "0.0.1",
4+
"main": "index.js",
5+
"description": "The Visual Programming Editor for Webduino",
6+
"repository": "https://github.com/webduinoio/webduino-blockly.git",
7+
"homepage": "https://webduino.io",
8+
"keywords": [
9+
"arduino",
10+
"webduino",
11+
"blockly"
12+
],
13+
"license": "MIT",
14+
"dependencies": {
15+
"webduino-js": "~ 0.1.8"
16+
}
17+
}

webduino-blockly.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
+(function (factory) {
2+
if (typeof exports === 'undefined') {
3+
factory(window);
4+
} else {
5+
module.exports = factory;
6+
}
7+
}(function (scope) {
8+
'use strict';
9+
110
function boardReady(device, callback) {
211
var board = new webduino.WebArduino(device);
312
board.on(webduino.BoardEvent.READY, callback.bind(null, board));
@@ -163,3 +172,21 @@ function delay(t) {
163172
});
164173
}
165174

175+
scope.boardReady = boardReady;
176+
scope.getLed = getLed;
177+
scope.getRelay = getRelay;
178+
scope.getRGBLed = getRGBLed;
179+
scope.getUltrasonic = getUltrasonic;
180+
scope.getButton = getButton;
181+
scope.getPir = getPir;
182+
scope.getSound = getSound;
183+
scope.getShock = getShock;
184+
scope.getDht = getDht;
185+
scope.getBuzzer = getBuzzer;
186+
scope.getServo = getServo;
187+
scope.getCar = getCar;
188+
scope.Car = Car;
189+
scope.dhtAreaChart = dhtAreaChart;
190+
scope.delay = delay;
191+
192+
}));

0 commit comments

Comments
 (0)