leanweb 1.1.8 → 1.1.9
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 +0 -20
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -488,21 +488,6 @@ Importing a JSON file:
|
|
|
488
488
|
import someJSON from "./some.json";
|
|
489
489
|
```
|
|
490
490
|
|
|
491
|
-
Importing CSS/SCSS:
|
|
492
|
-
|
|
493
|
-
```javascript
|
|
494
|
-
import agate from "/node_modules/highlight.js/scss/agate.scss";
|
|
495
|
-
|
|
496
|
-
// customElements.define('demo-root',
|
|
497
|
-
// class extends LWElement { // LWElement extends HTMLElement
|
|
498
|
-
// constructor() {
|
|
499
|
-
// super(ast);
|
|
500
|
-
super.applyStyles(agate);
|
|
501
|
-
// }
|
|
502
|
-
// }
|
|
503
|
-
//);
|
|
504
|
-
```
|
|
505
|
-
|
|
506
491
|
## Component Communication
|
|
507
492
|
|
|
508
493
|
The following project demonstrates how Leanweb helps web components to talk to
|
|
@@ -674,11 +659,6 @@ Called when the componnet `lw-if` is evaluated `false`.
|
|
|
674
659
|
If `urlHashChanged()` is defined as a function, it will be called whenever the
|
|
675
660
|
urlHash changes. This could be useful to update the DOM in component routing.
|
|
676
661
|
|
|
677
|
-
#### applyStyles(...styles)
|
|
678
|
-
|
|
679
|
-
`applyStyles` will apply the styles that is imported from a css or scss into
|
|
680
|
-
the web component DOM.
|
|
681
|
-
|
|
682
662
|
### LWEventBus
|
|
683
663
|
|
|
684
664
|
`LWElement` comes with a global instance of `LWEventBus` that helps web
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "leanweb",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "Builds framework agnostic web components.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"leanweb": "leanweb.js",
|
|
@@ -20,25 +20,25 @@
|
|
|
20
20
|
"author": "Qian Chen",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@babel/core": "^7.17.
|
|
24
|
-
"@babel/parser": "^7.17.
|
|
23
|
+
"@babel/core": "^7.17.8",
|
|
24
|
+
"@babel/parser": "^7.17.8",
|
|
25
25
|
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
26
26
|
"@babel/preset-env": "^7.16.11",
|
|
27
|
-
"babel-loader": "^8.2.
|
|
28
|
-
"clean-css": "^5.
|
|
29
|
-
"css-loader": "^6.
|
|
30
|
-
"fs-extra": "^10.0.
|
|
27
|
+
"babel-loader": "^8.2.4",
|
|
28
|
+
"clean-css": "^5.3.0",
|
|
29
|
+
"css-loader": "^6.7.1",
|
|
30
|
+
"fs-extra": "^10.0.1",
|
|
31
31
|
"globby": "^13.1.1",
|
|
32
32
|
"html-minifier": "^4.0.0",
|
|
33
|
-
"isomorphic-git": "^1.
|
|
33
|
+
"isomorphic-git": "^1.17.0",
|
|
34
34
|
"json5-loader": "^4.0.1",
|
|
35
35
|
"node-watch": "^0.7.3",
|
|
36
36
|
"parse5": "^6.0.1",
|
|
37
37
|
"raw-loader": "^4.0.2",
|
|
38
|
-
"sass": "^1.49.
|
|
39
|
-
"sass-loader": "^12.
|
|
38
|
+
"sass": "^1.49.11",
|
|
39
|
+
"sass-loader": "^12.6.0",
|
|
40
40
|
"semver": "^7.3.5",
|
|
41
|
-
"webpack": "^5.
|
|
42
|
-
"webpack-dev-server": "^4.
|
|
41
|
+
"webpack": "^5.71.0",
|
|
42
|
+
"webpack-dev-server": "^4.8.0"
|
|
43
43
|
}
|
|
44
44
|
}
|