@onlineapps/cookbook-template-helpers 1.0.13 → 1.0.14
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 +9 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -65,17 +65,21 @@ Helpers jsou k dispozici při resolvování template proměnných:
|
|
|
65
65
|
|
|
66
66
|
## Integration
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
Tyto helpery jsou v `@onlineapps/cookbook-executor` zapojené **jako výchozí** —
|
|
69
|
+
executor si je vyžádá sám a nic se předávat nemusí:
|
|
69
70
|
|
|
70
71
|
```javascript
|
|
71
|
-
const templateHelpers = require('@onlineapps/cookbook-template-helpers');
|
|
72
72
|
const { CookbookExecutor } = require('@onlineapps/cookbook-executor');
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
});
|
|
74
|
+
// helpers se neuvádí — executor použije tento balíček automaticky
|
|
75
|
+
const executor = new CookbookExecutor(cookbook);
|
|
77
76
|
```
|
|
78
77
|
|
|
78
|
+
Volba `helpers` existuje jen jako **override** — když ji předáš, výchozí sada se
|
|
79
|
+
nepoužije a platí výhradně to, co jsi předal (viz `cookbook-executor/src/executor.js`,
|
|
80
|
+
`const helpers = options.helpers || templateHelpers`). Pokud chceš výchozí helpery
|
|
81
|
+
zachovat a jen přidat vlastní, musíš je do override sady zahrnout — viz níže.
|
|
82
|
+
|
|
79
83
|
## Adding Custom Helpers
|
|
80
84
|
|
|
81
85
|
You can combine global helpers with custom helpers:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlineapps/cookbook-template-helpers",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "Template helper functions for cookbook variable resolution - string2file, file2string, and more",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"author": "OnlineApps",
|
|
20
20
|
"license": "PROPRIETARY",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@onlineapps/content-resolver": "
|
|
22
|
+
"@onlineapps/content-resolver": "2.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"jest": "29.7.0"
|