@divkitframework/divkit 3.0.0 → 3.0.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 +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
### Installation
|
|
4
4
|
|
|
5
5
|
```
|
|
6
|
-
npm i @
|
|
6
|
+
npm i @divkitframework/divkit --save
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
### Usage
|
|
@@ -21,7 +21,7 @@ JS code can be bundled with various strategies. Basically you need to answer a f
|
|
|
21
21
|
On the server side there is `/server` module:
|
|
22
22
|
|
|
23
23
|
```js
|
|
24
|
-
import {render} from '@
|
|
24
|
+
import {render} from '@divkitframework/divkit/server';
|
|
25
25
|
|
|
26
26
|
const html = render({
|
|
27
27
|
id: 'smth',
|
|
@@ -38,7 +38,7 @@ const html = render({
|
|
|
38
38
|
Then use `/client-hydratable` on client to hydrate server-side html::
|
|
39
39
|
|
|
40
40
|
```js
|
|
41
|
-
import {render} from '@
|
|
41
|
+
import {render} from '@divkitframework/divkit/client-hydratable';
|
|
42
42
|
|
|
43
43
|
render({
|
|
44
44
|
id: 'smth',
|
|
@@ -59,7 +59,7 @@ render({
|
|
|
59
59
|
For the client-only usage there is `/client` module. The size of this module is slightly smaller than `/client-hydratable`.
|
|
60
60
|
|
|
61
61
|
```js
|
|
62
|
-
import {render} from '@
|
|
62
|
+
import {render} from '@divkitframework/divkit/client';
|
|
63
63
|
|
|
64
64
|
render({
|
|
65
65
|
id: 'smth',
|
|
@@ -102,7 +102,7 @@ ES modules can be used in the browser directly without any build:
|
|
|
102
102
|
|
|
103
103
|
```html
|
|
104
104
|
<script type="module">
|
|
105
|
-
import {render} from './node_modules/@
|
|
105
|
+
import {render} from './node_modules/@divkitframework/divkit/dist/esm/client.mjs';
|
|
106
106
|
|
|
107
107
|
render({
|
|
108
108
|
id: 'smth',
|
|
@@ -121,7 +121,7 @@ ES modules can be used in the browser directly without any build:
|
|
|
121
121
|
### Use in the browser via global variables without build:
|
|
122
122
|
|
|
123
123
|
```html
|
|
124
|
-
<script src="./node_modules/@
|
|
124
|
+
<script src="./node_modules/@divkitframework/divkit/dist/browser/client.js"></script>
|
|
125
125
|
<script>
|
|
126
126
|
window.Ya.Divkit.render({
|
|
127
127
|
id: 'smth',
|