@dsplay/template-manifest 1.0.1 → 1.0.2
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/package.json +1 -1
- package/vite-plugin.js +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsplay/template-manifest",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Statically scans a DSPLAY HTML template's source for its dsplay_template variables and captures its dsplay-data.js as example preview data, producing template-variables.json + template-example-data.json for the CMS to auto-detect variables and seed default preview values.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./core.js",
|
package/vite-plugin.js
CHANGED
|
@@ -14,6 +14,10 @@ export default function templateManifestPlugin(options = {}) {
|
|
|
14
14
|
|
|
15
15
|
return {
|
|
16
16
|
name: 'dsplay-template-manifest',
|
|
17
|
+
// only run during an actual production build - Vitest drives the same plugin
|
|
18
|
+
// pipeline in 'serve' mode and reports a placeholder build.outDir, which would
|
|
19
|
+
// otherwise make closeBundle() write the manifest into a bogus folder.
|
|
20
|
+
apply: 'build',
|
|
17
21
|
configResolved(resolvedConfig) {
|
|
18
22
|
config = resolvedConfig;
|
|
19
23
|
},
|