ironflock 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,9 +10,15 @@ So if you use the library in your app, the data collection will always be privat
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Install
|
|
14
14
|
|
|
15
|
+
```shell
|
|
16
|
+
npm install --save ironflock
|
|
15
17
|
```
|
|
18
|
+
|
|
19
|
+
**CommonJS**
|
|
20
|
+
|
|
21
|
+
```js
|
|
16
22
|
const IronFlock = require("ironflock")
|
|
17
23
|
const ironflock = new IronFlock()
|
|
18
24
|
|
|
@@ -23,18 +29,18 @@ ironflock.publish("re.example.rpc", [{ example_data: "test" }]) // any type of d
|
|
|
23
29
|
|
|
24
30
|
For ES6 modules `"type": "module"` is required in your package.json
|
|
25
31
|
|
|
26
|
-
```
|
|
32
|
+
```js
|
|
27
33
|
import IronFlock from "ironflock"
|
|
28
34
|
const ironflock = new IronFlock()
|
|
29
35
|
|
|
30
36
|
ironflock.publish("re.example.rpc", [{ example_data: "test" }]) // any type of data is publishable
|
|
31
37
|
```
|
|
32
38
|
|
|
33
|
-
|
|
39
|
+
### Options
|
|
34
40
|
|
|
35
41
|
The `IronFlock` constructor can be configured with the following options:
|
|
36
42
|
|
|
37
|
-
```
|
|
43
|
+
```ts
|
|
38
44
|
{
|
|
39
45
|
quiet?: boolean;
|
|
40
46
|
serialNumber?: string;
|
|
@@ -44,3 +50,15 @@ The `IronFlock` constructor can be configured with the following options:
|
|
|
44
50
|
**quiet**: Toggles autobahn.js debug information
|
|
45
51
|
|
|
46
52
|
**serialNumber**: Used to set the serial_number of the device if the `DEVICE_SERIAL_NUMBER` environment variable does not exist. It can also be used if the user wishes to authenticate as another device.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## Development
|
|
56
|
+
|
|
57
|
+
To publish a new release
|
|
58
|
+
|
|
59
|
+
```shell
|
|
60
|
+
npm run build
|
|
61
|
+
npm run release
|
|
62
|
+
npm run publish
|
|
63
|
+
```
|
|
64
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ironflock",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Collect data in the IronFlock Storage architecture",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"ws": "^7.5.5"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"
|
|
19
|
-
"release": "npm version
|
|
18
|
+
"build": "rm -rf dist && tsc",
|
|
19
|
+
"release": "npm version patch --tag-version-prefix='' && git push && git push --tag",
|
|
20
20
|
"publish": "npm publish"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|