Skip to content

Commit 1615698

Browse files
authored
Merge pull request #363 from kuzzleio/6.0.0-beta-6-proposal
Release 6.0.0-beta-6
2 parents e35eb66 + e8aa279 commit 1615698

File tree

19 files changed

+1076
-802
lines changed

19 files changed

+1076
-802
lines changed

.babelrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/env',
5+
{
6+
targets: {
7+
browsers: ['> 1%']
8+
}
9+
}
10+
]
11+
],
12+
plugins: [
13+
['@babel/plugin-transform-for-of', {'assumeArray': true}]
14+
]
15+
};

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ try {
5353

5454
This SDK can be used either in NodeJS or in a browser.
5555

56-
### NodeJS
56+
### Node.js
5757

5858
```
5959
# Beta v6
60-
npm install git://github.com/kuzzleio/sdk-javascript.git#6-beta
60+
npm install kuzzle-sdk@beta
6161
```
6262

6363
### Browser
@@ -102,18 +102,19 @@ But you'll still need to pick the built version (which ships with the package).
102102

103103
```javascript
104104
// with the classic require...
105-
const { Kuzzle } = require('kuzzle-sdk/dist/kuzzle.js')
105+
const { Kuzzle } = require('kuzzle-sdk')
106106
// ... or with the new import directive.
107-
import { Kuzzle } from 'kuzzle-sdk/dist/kuzzle.js'
107+
import { Kuzzle } from 'kuzzle-sdk'
108108
```
109109

110110
## Available protocols
111-
Currently, the SDK provides 3 protocols: `Http`, `WebSocket` and `SocketIO`.
111+
112+
Currently, the SDK provides 3 protocols: `Http`, `WebSocket` and `SocketIO`.
112113

113114
WebSocket and Socket.IO protocols implement the whole Kuzzle API, while the **HTTP protocol does not implement realtime features** (rooms and subscriptions).
114115
While Socket.IO offers better compatibility with older web browsers, our raw WebSocket implementation is about 20% faster.
115116

116-
#### NodeJS
117+
#### Node.js
117118

118119
We recommend using the `WebSocket` protocol, but you can still use `Http`, `SocketIO` or even a custom protocol if you want.
119120

@@ -225,8 +226,8 @@ Each controller is accessible from the Kuzzle object. The controller's actions a
225226
For example, for the `create` action of the `document` controller ([document:create](https://docs-v2.kuzzle.io/api/1/controller-document/create)):
226227
```js
227228
const options = { refresh: 'wait_for' };
228-
const documentBody = { hello: 'world' };
229-
kuzzle.document.create('my-index', 'my-collection', documentBody, 'my-uniq-id', options)
229+
const document = { hello: 'world' };
230+
kuzzle.document.create('my-index', 'my-collection', document, 'my-uniq-id', options)
230231
```
231232

232233
The parameters of each method differ according to the parameters expected in the API.

build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const
22
ora = require('ora'),
33
webpack = require('webpack'),
44
webpackConfig = require('./webpack.config.js'),
5-
spinner = ora('Building SDK for browser use...');
5+
spinner = ora('Building SDK...');
66

77
process.env.NODE_ENV = 'production';
88

0 commit comments

Comments
 (0)