unplugin-version-injector 2.1.0-beta.1 → 2.1.0-beta.3

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/dist/rollup.js CHANGED
@@ -37,13 +37,13 @@ function createVersionInjector(options = {}) {
37
37
  const { version, name } = options.version && options.name ? options : getPackageVersion();
38
38
  const buildTime = ((_a = options.formatDate) != null ? _a : defaultFormatDate)(/* @__PURE__ */ new Date());
39
39
  const metaTag = `<meta name="version" content="${version}">
40
- <meta name="name" content="${name}">
40
+ <meta name="project" content="${name}">
41
41
  `;
42
42
  const logScript = `
43
43
  <script data-injected="unplugin-version-injector">
44
44
  (function () {
45
45
  var isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
46
- var bg = isDark ? '#1e1e1e' : '#ffffff';
46
+ var bg = isDark ? '#ffffff' : '#1e1e1e' ;
47
47
  var border = 'border-radius: 4px; padding: 4px; font-size: 12px;';
48
48
  var styles = {
49
49
  version: \`background: \${bg}; color: #00c853; \${border}\`,
package/dist/rollup.mjs CHANGED
@@ -30,13 +30,13 @@ function createVersionInjector(options = {}) {
30
30
  const { version, name } = options.version && options.name ? options : getPackageVersion();
31
31
  const buildTime = ((_a = options.formatDate) != null ? _a : defaultFormatDate)(/* @__PURE__ */ new Date());
32
32
  const metaTag = `<meta name="version" content="${version}">
33
- <meta name="name" content="${name}">
33
+ <meta name="project" content="${name}">
34
34
  `;
35
35
  const logScript = `
36
36
  <script data-injected="unplugin-version-injector">
37
37
  (function () {
38
38
  var isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
39
- var bg = isDark ? '#1e1e1e' : '#ffffff';
39
+ var bg = isDark ? '#ffffff' : '#1e1e1e' ;
40
40
  var border = 'border-radius: 4px; padding: 4px; font-size: 12px;';
41
41
  var styles = {
42
42
  version: \`background: \${bg}; color: #00c853; \${border}\`,
package/dist/vite.js CHANGED
@@ -37,13 +37,13 @@ function createVersionInjector(options = {}) {
37
37
  const { version, name } = options.version && options.name ? options : getPackageVersion();
38
38
  const buildTime = ((_a = options.formatDate) != null ? _a : defaultFormatDate)(/* @__PURE__ */ new Date());
39
39
  const metaTag = `<meta name="version" content="${version}">
40
- <meta name="name" content="${name}">
40
+ <meta name="project" content="${name}">
41
41
  `;
42
42
  const logScript = `
43
43
  <script data-injected="unplugin-version-injector">
44
44
  (function () {
45
45
  var isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
46
- var bg = isDark ? '#1e1e1e' : '#ffffff';
46
+ var bg = isDark ? '#ffffff' : '#1e1e1e' ;
47
47
  var border = 'border-radius: 4px; padding: 4px; font-size: 12px;';
48
48
  var styles = {
49
49
  version: \`background: \${bg}; color: #00c853; \${border}\`,
package/dist/vite.mjs CHANGED
@@ -30,13 +30,13 @@ function createVersionInjector(options = {}) {
30
30
  const { version, name } = options.version && options.name ? options : getPackageVersion();
31
31
  const buildTime = ((_a = options.formatDate) != null ? _a : defaultFormatDate)(/* @__PURE__ */ new Date());
32
32
  const metaTag = `<meta name="version" content="${version}">
33
- <meta name="name" content="${name}">
33
+ <meta name="project" content="${name}">
34
34
  `;
35
35
  const logScript = `
36
36
  <script data-injected="unplugin-version-injector">
37
37
  (function () {
38
38
  var isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
39
- var bg = isDark ? '#1e1e1e' : '#ffffff';
39
+ var bg = isDark ? '#ffffff' : '#1e1e1e' ;
40
40
  var border = 'border-radius: 4px; padding: 4px; font-size: 12px;';
41
41
  var styles = {
42
42
  version: \`background: \${bg}; color: #00c853; \${border}\`,
package/dist/webpack.js CHANGED
@@ -2714,13 +2714,13 @@ function createVersionInjector(options = {}) {
2714
2714
  const { version, name } = options.version && options.name ? options : getPackageVersion();
2715
2715
  const buildTime = ((_a = options.formatDate) != null ? _a : defaultFormatDate)(/* @__PURE__ */ new Date());
2716
2716
  const metaTag = `<meta name="version" content="${version}">
2717
- <meta name="name" content="${name}">
2717
+ <meta name="project" content="${name}">
2718
2718
  `;
2719
2719
  const logScript = `
2720
2720
  <script data-injected="unplugin-version-injector">
2721
2721
  (function () {
2722
2722
  var isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
2723
- var bg = isDark ? '#1e1e1e' : '#ffffff';
2723
+ var bg = isDark ? '#ffffff' : '#1e1e1e' ;
2724
2724
  var border = 'border-radius: 4px; padding: 4px; font-size: 12px;';
2725
2725
  var styles = {
2726
2726
  version: \`background: \${bg}; color: #00c853; \${border}\`,
package/dist/webpack.mjs CHANGED
@@ -2707,13 +2707,13 @@ function createVersionInjector(options = {}) {
2707
2707
  const { version, name } = options.version && options.name ? options : getPackageVersion();
2708
2708
  const buildTime = ((_a = options.formatDate) != null ? _a : defaultFormatDate)(/* @__PURE__ */ new Date());
2709
2709
  const metaTag = `<meta name="version" content="${version}">
2710
- <meta name="name" content="${name}">
2710
+ <meta name="project" content="${name}">
2711
2711
  `;
2712
2712
  const logScript = `
2713
2713
  <script data-injected="unplugin-version-injector">
2714
2714
  (function () {
2715
2715
  var isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
2716
- var bg = isDark ? '#1e1e1e' : '#ffffff';
2716
+ var bg = isDark ? '#ffffff' : '#1e1e1e' ;
2717
2717
  var border = 'border-radius: 4px; padding: 4px; font-size: 12px;';
2718
2718
  var styles = {
2719
2719
  version: \`background: \${bg}; color: #00c853; \${border}\`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unplugin-version-injector",
3
- "version": "2.1.0-beta.1",
3
+ "version": "2.1.0-beta.3",
4
4
  "author": "Nian Yi <nianyi778@gmail.com>",
5
5
  "license": "MIT",
6
6
  "description": "A universal plugin to inject version and build time into HTML (supports Webpack, Vite, Rollup)",