chore: bump v0.116 (#822)

* chore: bump v0.116

* docs: update changelog
This commit is contained in:
Juro Oravec 2024-12-06 08:48:49 +01:00 committed by GitHub
parent be27c1c94d
commit 468a593a47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 46 additions and 1 deletions

View file

@ -1,5 +1,50 @@
# Release notes
## v0.116
#### Fix
- Fix the order of execution of JS scripts:
- Scripts in `Component.Media.js` are executed in the order they are defined
- Scripts in `Component.js` are executed AFTER `Media.js` scripts
- Fix compatibility with AlpineJS
- Scripts in `Component.Media.js` are now again inserted as `<script>` tags
- By default, `Component.Media.js` are inserted as synchronous `<script>` tags,
so the AlpineJS components registered in the `Media.js` scripts will now again
run BEFORE the core AlpineJS script.
AlpineJS can be configured like so:
Option 1 - AlpineJS loaded in `<head>` with `defer` attribute:
```html
<html>
<head>
{% component_css_dependencies %}
<script defer src="https://unpkg.com/alpinejs"></script>
</head>
<body>
{% component 'my_alpine_component' / %}
{% component_js_dependencies %}
</body>
</html>
```
Option 2 - AlpineJS loaded in `<body>` AFTER `{% component_js_depenencies %}`:
```html
<html>
<head>
{% component_css_dependencies %}
</head>
<body>
{% component 'my_alpine_component' / %}
{% component_js_dependencies %}
<script src="https://unpkg.com/alpinejs"></script>
</body>
</html>
```
## v0.115
#### Fix

View file

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "django_components"
version = "0.115"
version = "0.116"
requires-python = ">=3.8, <4.0"
description = "A way to create simple reusable template components in Django."
keywords = ["django", "components", "css", "js", "html"]