@webjourney/vite-plugins 1.2.8-0 → 1.2.9-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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,wBAAgB,uBAAuB;;;oBAKnB,MAAM,MAAM,MAAM;;;;EA0MrC;AAED,wBAAgB,sBAAsB;;;6BAKT,MAAM;EAelC;AAED,wBAAgB,iBAAiB;;;oBAlOb,MAAM,MAAM,MAAM;;;;;;;6BAiNT,MAAM;KAqBlC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,wBAAgB,uBAAuB;;;oBAKnB,MAAM,MAAM,MAAM;;;;EA0MrC;AAED,wBAAgB,sBAAsB;;;6BAKT,MAAM;EAoBlC;AAED,wBAAgB,iBAAiB;;;oBAvOb,MAAM,MAAM,MAAM;;;;;;;6BAiNT,MAAM;KA0BlC"}
package/dist/index.js CHANGED
@@ -143,13 +143,17 @@ export function webjourneyPluginScript() {
143
143
  name: 'webjourney-plugin-script',
144
144
  enforce: 'pre',
145
145
  transformIndexHtml(html) {
146
- // Get project ID from environment variable
146
+ // Get project ID and badge visibility from environment variables
147
147
  const projectId = process.env.WEBJOURNEY_PROJECT_ID;
148
- // Build the meta tag if project ID exists
149
- const metaTag = projectId
148
+ const hideBadge = process.env.WEBJOURNEY_HIDE_BADGE === 'true';
149
+ // Build the meta tags
150
+ const projectIdTag = projectId
150
151
  ? `<meta name="webjourney-project-id" content="${projectId}">\n `
151
152
  : '';
152
- return html.replace('</head>', `${metaTag}<script src="${webjourneyPluginScriptHost}/plugins/plugin.iife.js"></script></head>`);
153
+ const hideBadgeTag = hideBadge
154
+ ? `<meta name="webjourney-hide-badge" content="true">\n `
155
+ : '';
156
+ return html.replace('</head>', `${projectIdTag}${hideBadgeTag}<script src="${webjourneyPluginScriptHost}/plugins/plugin.iife.js"></script></head>`);
153
157
  }
154
158
  };
155
159
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webjourney/vite-plugins",
3
- "version": "1.2.8-0",
3
+ "version": "1.2.9-0",
4
4
  "description": "Vite plugins for Webjourney WYSIWYG editing",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",