You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Engine ${name} not configured correctly. Please configure your engines in patternlab-config.json as documented in https://patternlab.io/docs/editing-the-configuration-options/#heading-engines`
126
+
);
114
127
}
115
128
}catch(err){
116
129
errorMessage=err.message;
117
130
}finally{
118
131
// report on the status of the engine, one way or another!
119
132
logger.info(
120
-
`Pattern Engine ${engineDiscovery.name}: ${
133
+
`Pattern Engine ${engineConfig.extension}: ${
121
134
errorMessage ? errorMessage : successMessage
122
135
}`
123
136
);
124
137
}
138
+
}
139
+
}else{
140
+
// Try to load engines! We scan for engines at each path specified above. This
Copy file name to clipboardExpand all lines: packages/docs/src/docs/advanced-config-options.md
+30-1
Original file line number
Diff line number
Diff line change
@@ -164,6 +164,35 @@ Sets the panel name and language for the code tab on the styleguide. Since this
164
164
165
165
**default**: `mustache`
166
166
167
+
### engines
168
+
169
+
An engine is a wrapper around a templating library like Mustache, Handlebars, Twig or others. An engine package
170
+
is the bridge between PatternLab and the standalone NPM package supporting the templating language.
171
+
172
+
`engines` accepts an map of Engine objects. The mandatory properties for each PatternLab engine are:
173
+
174
+
-`package`: the NodeJS package name. Add the package of the engine as a dependency in `package.json` before you configure it here.
175
+
-`fileExtensions`: list of pattern file extensions which will be handled by this pattern engine.
176
+
177
+
Other engine specific configuration options can be added and will be passed to the pattern engine at loading time. See the NPM package documentation for the properties each pattern engine supports.
178
+
179
+
**default**:
180
+
181
+
```javascript
182
+
"engines": {
183
+
"mustache": {
184
+
"package":"@pattern-lab/engine-mustache",
185
+
"extensions": [
186
+
"mustache"
187
+
],
188
+
...
189
+
}
190
+
}
191
+
```
192
+
193
+
Configuring the engines in the config file was introduced in v5.14. The fallback lookup mode by scanning the
194
+
`node_modules` folder is **deprecated** will be removed in v6.
195
+
167
196
### patternStateCascade
168
197
169
198
See the [Pattern State Documentation](/docs/using-pattern-states/)
@@ -336,7 +365,7 @@ Important details:
336
365
- the [default `paths.source` object paths](https://github.com/pattern-lab/patternlab-node/pull/840/commits/a4961bd5d696a05fb516cdd951163b0f918d5e19) within `patternlab-config.json` are now relative to the current UIKit. See the [structure of uikit-workshop](https://github.com/pattern-lab/patternlab-node/tree/master/packages/uikit-workshop) for more info
337
366
- the [default `paths.public` object paths](https://github.com/pattern-lab/patternlab-node/pull/840/commits/812bab3659f504043e8b61b1dc1cdac71f248449) within `patternlab-config.json` are now relative to the current UIKit's `outputDir`. Absolute paths will no longer work. Someone could test putting an absolute path in a UIKit `outputDir` property and see what happens I suppose.
338
367
-`dependencyGraph.json` has moved to the project root rather than `public/` as we should only retain one
339
-
- The lookup of the uikit by `name` is deprecated and the user will be notified of it. If the `package` property isn't defined, there is a default fallback lookup strategy where the value of `name` is tried as:
368
+
- The lookup of the uikit by `name` is **deprecated** and will be removed in v6. The user will be notified of it. If the `package` property isn't defined, there is a default fallback lookup strategy where the value of `name` is tried as:
0 commit comments