Skip to content

Commit f627705

Browse files
committed
Version 4.1.0: add the js iife bundle as a static file
1 parent c14f320 commit f627705

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
recursive-include instant/migrations *
2-
recursive-include instant/management *
2+
recursive-include instant/management *
3+
recursive-include instant/static *

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,20 @@ Several options are available for the client side
159159
Manage your websockets connection manually with the official Centrifugo js library:
160160
[Centrifuge-js](https://github.com/centrifugal/centrifuge-js)
161161

162+
### Use the embeded client in a script tag
163+
164+
In a Django template:
165+
166+
```html
167+
{% load static %}
168+
<script src="{% static 'instant/index.min.js' %}"></script>
169+
<script>
170+
const instant = $instant.useInstant();
171+
</script>
172+
```
173+
174+
[Api doc](https://github.com/synw/djangoinstant#usage)
175+
162176
### Use the npm client
163177

164178
A dedicated [client](https://github.com/synw/djangoinstant) is available from npm

instant/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "4.0.1"
1+
__version__ = "4.1.0"
22
default_app_config = "instant.apps.InstantConfig"

instant/static/instant/index.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)