8000 0.3.7 · ulyssear/css-in-js-in-html@bb8cb52 · GitHub
[go: up one dir, main page]

Skip to content

Commit bb8cb52

Browse files
Ulysse ARNAUDUlysse ARNAUD
authored andcommitted
0.3.7
1 parent 71b24e0 commit bb8cb52

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.github/workflows/deploy-image.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
file_pattern: |
4141
./.gitignore
4242
build/index.min.js
43+
build/index.min.js.gz
4344
skip_dirty_check: true
4445
push_options: '--force'
4546
branch: ${{ steps.package-version.outputs.current-version }}
@@ -61,6 +62,7 @@ jobs:
6162
with:
6263
files: |
6364
build/index.min.js
65+
build/index.min.js.gz
6466
tag_name: ${{ steps.package-version.outputs.current-version }}
6567
name: ${{ steps.package-version.outputs.current-version }}
6668
body: |

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ __Older browsers__
111111

112112
1. Import `main.js` in your HTML file
113113
```html
114-
<script src="https://cdn.jsdelivr.net/gh/ulyssear/css-in-js-in-html@0.2.0/build/index.min.js"></script>
114+
<script src="https://cdn.jsdelivr.net/gh/ulyssear/css-in-js-in-html@0.3.7/build/index.min.js"></script>
115115
```
116116

117117
2. Add one line of CSS to hide the page while building (and permits to hide elements with hidden attribute)
@@ -127,7 +127,7 @@ __Older browsers__
127127
```
128128
2. Import `main.js` in your HTML file
129129
```html
130-
<script src="path/to/css-in-js-in-html/main.js"></script>
130+
<script src="path/to/css-in-js-in-html/build/index.min.js"></script>
131131
```
132132

133133
<p align="right">(<a href="#readme-top">back to top</a>)</p>

build/index.min.js

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

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ function init() {
160160
main();
161161
}
162162
document.addEventListener('DOMContentLoaded', init);
163+
let observer;
163164
window.addEventListener('css-in-js-in-html-ready', function () {
164-
const observer = new MutationObserver(init);
165-
observer.observe(document, { attributes: true, childList: true, subtree: true });
165+
if (!observer) {
166+
observer = new MutationObserver(init);
167+
observer.observe(document, { attributes: true, childList: true, subtree: true });
168+
}
166169
} );

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ulyssear/css-in-js-in-html",
3-
"version": "0.3.6",
3+
"version": "0.3.7",
44
"description": "CSS-in-JS-in-HTML is a library that allows you to use CSS-in-JS with HTML only.",
55
"main": "build/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)
0