@dosgato/templating 0.0.6 → 0.0.7
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/dist/provider.d.ts +5 -5
- package/dist/provider.js +3 -3
- package/dist/uitemplate.d.ts +8 -0
- package/dist/uitemplate.js +2 -0
- package/package.json +5 -2
package/dist/provider.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ export interface CSSBlock {
|
|
|
2
2
|
css?: string;
|
|
3
3
|
path?: string;
|
|
4
4
|
version?: string;
|
|
5
|
-
|
|
5
|
+
async?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export interface JSBlock {
|
|
8
8
|
js?: string;
|
|
9
9
|
path?: string;
|
|
10
10
|
version?: string;
|
|
11
|
-
|
|
11
|
+
async?: boolean;
|
|
12
12
|
}
|
|
13
13
|
export interface FileDeclaration {
|
|
14
14
|
path: string;
|
|
@@ -40,7 +40,7 @@ export declare abstract class ResourceProvider {
|
|
|
40
40
|
* `path` property with the full server path (NOT URL) to a CSS file (node's __dirname function will
|
|
41
41
|
* help you determine it). You MUST provide one or the other.
|
|
42
42
|
*
|
|
43
|
-
* You may also set `
|
|
43
|
+
* You may also set `async` to true if a css block is not needed for the initial render of
|
|
44
44
|
* the page. For instance, if your component has a modal that the user can trigger, you can
|
|
45
45
|
* defer the CSS for that modal since it will not be needed until the page has gone interactive
|
|
46
46
|
* and the user has clicked something.
|
|
@@ -49,9 +49,9 @@ export declare abstract class ResourceProvider {
|
|
|
49
49
|
/**
|
|
50
50
|
* Same as cssBlocks() but for javascript.
|
|
51
51
|
*
|
|
52
|
-
* In this case `
|
|
52
|
+
* In this case `async` is much more useful, as most javascript is interactive and could run
|
|
53
53
|
* after the page renders. Any code that adds event observers or the like should be marked with
|
|
54
|
-
*
|
|
54
|
+
* async to improve the initial render time.
|
|
55
55
|
*/
|
|
56
56
|
static jsBlocks: Map<string, JSBlock>;
|
|
57
57
|
/**
|
package/dist/provider.js
CHANGED
|
@@ -30,7 +30,7 @@ exports.ResourceProvider = ResourceProvider;
|
|
|
30
30
|
* `path` property with the full server path (NOT URL) to a CSS file (node's __dirname function will
|
|
31
31
|
* help you determine it). You MUST provide one or the other.
|
|
32
32
|
*
|
|
33
|
-
* You may also set `
|
|
33
|
+
* You may also set `async` to true if a css block is not needed for the initial render of
|
|
34
34
|
* the page. For instance, if your component has a modal that the user can trigger, you can
|
|
35
35
|
* defer the CSS for that modal since it will not be needed until the page has gone interactive
|
|
36
36
|
* and the user has clicked something.
|
|
@@ -39,9 +39,9 @@ ResourceProvider.cssBlocks = new Map();
|
|
|
39
39
|
/**
|
|
40
40
|
* Same as cssBlocks() but for javascript.
|
|
41
41
|
*
|
|
42
|
-
* In this case `
|
|
42
|
+
* In this case `async` is much more useful, as most javascript is interactive and could run
|
|
43
43
|
* after the page renders. Any code that adds event observers or the like should be marked with
|
|
44
|
-
*
|
|
44
|
+
* async to improve the initial render time.
|
|
45
45
|
*/
|
|
46
46
|
ResourceProvider.jsBlocks = new Map();
|
|
47
47
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dosgato/templating",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "A library to support building templates for dosgato CMS.",
|
|
5
5
|
"exports": {
|
|
6
6
|
"require": "./dist/index.js",
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
"prepublishOnly": "npm run build",
|
|
12
12
|
"build": "rm -rf dist && tsc"
|
|
13
13
|
},
|
|
14
|
-
"dependencies": {
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@iconify/svelte": "^2.2.1",
|
|
16
|
+
"svelte": "^3.48.0"
|
|
17
|
+
},
|
|
15
18
|
"devDependencies": {
|
|
16
19
|
"eslint-config-standard-with-typescript": "^21.0.1",
|
|
17
20
|
"typescript": "^4.4.2"
|