marko 5.18.2 → 5.19.0
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/docs/compiler.md +7 -0
- package/docs/marko-json.md +1 -0
- package/package.json +4 -4
package/docs/compiler.md
CHANGED
@@ -361,6 +361,13 @@ At this stage, you are given a fully parsed and migrated AST to do what you will
|
|
361
361
|
|
362
362
|
To hook into the `transform` stage you can use the `transform` option in the `marko.json` file.
|
363
363
|
|
364
|
+
### Analyze
|
365
|
+
|
366
|
+
Next up is the analyze stage. This stage is intended to do non mutative analysis of the entire AST in a way that is cached in memory.
|
367
|
+
Meta data should be stored on the `.extra` property of nodes and typically read in the [translate](#translate) stage, or using the child template analysis helpers.
|
368
|
+
|
369
|
+
To hook into the `analyze` stage you can use the `analyze` option in the `marko.json` file.
|
370
|
+
|
364
371
|
### Translate
|
365
372
|
|
366
373
|
Finally, we have the translation stage. This stage is Marko's "Rosetta Stone" and is responsible for turning your beautiful Marko code into the optimized JavaScript you'd rather avoid writing.
|
package/docs/marko-json.md
CHANGED
@@ -113,6 +113,7 @@ Typically, you should let Marko find these files automatically, but here is a re
|
|
113
113
|
"parse": "./parse.js", // Used to augment parsing.
|
114
114
|
"migrate": "./migrate.js", // Used for migrating deprecated features.
|
115
115
|
"transform": "./transform.js", // Used to modify the AST before generating it.
|
116
|
+
"analyze": "./analyze.js" // Used to analyze metadata the entire ast before beginning to translate it.
|
116
117
|
"translate": "./translate.js" // Used to generate custom JS.
|
117
118
|
}
|
118
119
|
```
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "marko",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.19.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
6
6
|
"dependencies": {
|
7
|
-
"@marko/compiler": "^5.
|
8
|
-
"@marko/translator-default": "^5.
|
7
|
+
"@marko/compiler": "^5.19.0",
|
8
|
+
"@marko/translator-default": "^5.19.0",
|
9
9
|
"app-module-path": "^2.2.0",
|
10
10
|
"argly": "^1.2.0",
|
11
11
|
"browser-refresh-client": "1.1.4",
|
@@ -72,5 +72,5 @@
|
|
72
72
|
"index.js",
|
73
73
|
"node-require.js"
|
74
74
|
],
|
75
|
-
"gitHead": "
|
75
|
+
"gitHead": "07f5e26b79d46982caf0d1ed593675b4778877ac"
|
76
76
|
}
|