@webwindowed/vite-plugin-cpp-header 1.0.0 → 1.1.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.
Files changed (3) hide show
  1. package/LICENSE +23 -23
  2. package/dist/index.mjs +8 -3
  3. package/package.json +1 -1
package/LICENSE CHANGED
@@ -1,23 +1,23 @@
1
- MIT License
2
-
3
- Copyright (c) 2017 Serge Zaitsev
4
- Copyright (c) 2022 Steffen André Langnes
5
- Copyright (c) 2026 Laupetin
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in all
15
- copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Serge Zaitsev
4
+ Copyright (c) 2022 Steffen André Langnes
5
+ Copyright (c) 2026 Laupetin
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
package/dist/index.mjs CHANGED
@@ -48,8 +48,6 @@ function writeHeader(bundle, outputDir, options, publicDir, devServerPort) {
48
48
  const includeFileEnumeration = options?.includeFileEnumeration ?? true;
49
49
  fs.writeSync(fd, `#pragma once
50
50
 
51
- #include <webwindowed/plugin/asset_handler.hpp>
52
-
53
51
  `);
54
52
  if (includeFileEnumeration) fs.writeSync(fd, `#include <cstdlib>
55
53
  #include <type_traits>
@@ -70,7 +68,14 @@ constexpr auto VITE_DEV_SERVER_PORT = ${devServerPort ? String(devServerPort) :
70
68
  }
71
69
  if (includeFileEnumeration) {
72
70
  fs.writeSync(fd, `
73
- static inline const webwindowed::asset VITE_ASSETS[] {
71
+ struct UiFile
72
+ {
73
+ const char* filename;
74
+ const void* data;
75
+ const size_t dataSize;
76
+ };
77
+
78
+ static inline const UiFile VITE_ASSETS[] {
74
79
  `);
75
80
  let index = 0;
76
81
  for (const fileName of fileNames) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webwindowed/vite-plugin-cpp-header",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "homepage": "https://github.com/Laupetin/webwindowed#readme",
6
6
  "license": "MIT",