marko 5.33.15 → 5.33.17
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/runtime/html/helpers/escape-script-placeholder.js +0 -4
- package/dist/runtime/html/helpers/escape-style-placeholder.js +0 -4
- package/docs/fastify.md +18 -0
- package/package.json +3 -3
- package/src/runtime/html/helpers/escape-script-placeholder.js +0 -4
- package/src/runtime/html/helpers/escape-style-placeholder.js +0 -4
package/docs/fastify.md
CHANGED
@@ -41,6 +41,24 @@ app.get("/", (request, reply) => {
|
|
41
41
|
await fastify.listen(3000);
|
42
42
|
```
|
43
43
|
|
44
|
+
### Global Outputs
|
45
|
+
|
46
|
+
We can add global outputs from the server side using the reply object or fastify instance.
|
47
|
+
|
48
|
+
```javascript
|
49
|
+
reply.locals.newProperty = "Your value";
|
50
|
+
```
|
51
|
+
|
52
|
+
To use this in marko components we just need to refer out.global
|
53
|
+
|
54
|
+
```marko
|
55
|
+
$ const { newProperty } = $global;
|
56
|
+
```
|
57
|
+
|
58
|
+
To know more about sending the data to the browser checkout:
|
59
|
+
|
60
|
+
### [Sending global data to browsers](https://markojs.com/docs/rendering/#sending-global-data-to-browsers)
|
61
|
+
|
44
62
|
### BYOB (Bring your own bundler)
|
45
63
|
|
46
64
|
For the large portion of Marko's API a bundler is required. The example code above assumes that Marko templates can be loaded in your environment.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "marko",
|
3
|
-
"version": "5.33.
|
3
|
+
"version": "5.33.17",
|
4
4
|
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
5
5
|
"keywords": [
|
6
6
|
"front-end",
|
@@ -64,8 +64,8 @@
|
|
64
64
|
"build": "babel ./src --out-dir ./dist --extensions .js --copy-files --config-file ../../babel.config.js --env-name=production"
|
65
65
|
},
|
66
66
|
"dependencies": {
|
67
|
-
"@marko/compiler": "^5.35.
|
68
|
-
"@marko/translator-default": "^5.32.
|
67
|
+
"@marko/compiler": "^5.35.12",
|
68
|
+
"@marko/translator-default": "^5.32.14",
|
69
69
|
"app-module-path": "^2.2.0",
|
70
70
|
"argly": "^1.2.0",
|
71
71
|
"browser-refresh-client": "1.1.4",
|