wesl-plugin 0.6.2 → 0.6.7
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/PluginExtension-B9OlwcsY.d.ts +511 -0
- package/dist/WeslPlugin-DjY8zodn.js +6137 -0
- package/dist/pluginIndex.d.ts +7 -4
- package/dist/pluginIndex.js +71 -62
- package/dist/plugins/astro.d.ts +4 -4
- package/dist/plugins/astro.js +10 -15
- package/dist/plugins/esbuild.d.ts +6 -6
- package/dist/plugins/esbuild.js +6 -9
- package/dist/plugins/farm.d.ts +6 -6
- package/dist/plugins/farm.js +6 -9
- package/dist/plugins/nuxt.d.ts +7 -8
- package/dist/plugins/nuxt.js +17 -24
- package/dist/plugins/rollup.d.ts +6 -6
- package/dist/plugins/rollup.js +6 -9
- package/dist/plugins/rspack.d.ts +5 -5
- package/dist/plugins/rspack.js +6 -9
- package/dist/plugins/vite.d.ts +6 -6
- package/dist/plugins/vite.js +4 -8
- package/dist/plugins/webpack.d.ts +6 -6
- package/dist/plugins/webpack.js +4 -8
- package/dist/vite-Bx_gff8v.js +8 -0
- package/dist/webpack-Bq0QiCAt.js +8 -0
- package/package.json +11 -10
- package/src/BindingLayoutExtension.ts +4 -4
- package/src/PluginApi.ts +201 -0
- package/src/PluginExtension.ts +3 -2
- package/src/WeslPlugin.ts +17 -198
- package/src/WeslPluginOptions.ts +1 -1
- package/src/defaultSuffixTypes.d.ts +1 -1
- package/src/extensions/LinkExtension.ts +9 -6
- package/src/extensions/StaticExtension.ts +9 -5
- package/src/plugins/nuxt.ts +1 -1
- package/dist/PluginExtension-B_oge2T3.d.ts +0 -48
- package/dist/WeslPluginOptions-ZzGgegv3.d.ts +0 -8
- package/dist/chunk-3YZCYXZ7.js +0 -11
- package/dist/chunk-JSBRDJBE.js +0 -30
- package/dist/chunk-LHNI4JI3.js +0 -6820
- package/dist/chunk-ZK6IKQOJ.js +0 -11
package/dist/pluginIndex.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { E as ExtensionEmitFn, a as PluginExtensionApi } from './PluginExtension-B_oge2T3.js';
|
|
3
|
-
import 'wesl';
|
|
1
|
+
import { ExtensionEmitFn, PluginExtension, PluginExtensionApi } from "./PluginExtension-B9OlwcsY.js";
|
|
4
2
|
|
|
3
|
+
//#region src/extensions/LinkExtension.d.ts
|
|
5
4
|
declare const linkBuildExtension: PluginExtension;
|
|
6
5
|
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/extensions/StaticExtension.d.ts
|
|
8
|
+
|
|
7
9
|
/**
|
|
8
10
|
* a wesl-js ?static build extension that statically links from the root file
|
|
9
11
|
* and emits a JavaScript file containing the linked wgsl string.
|
|
@@ -16,4 +18,5 @@ declare const linkBuildExtension: PluginExtension;
|
|
|
16
18
|
*/
|
|
17
19
|
declare const staticBuildExtension: PluginExtension;
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
//#endregion
|
|
22
|
+
export { ExtensionEmitFn, PluginExtension, PluginExtensionApi, linkBuildExtension, staticBuildExtension };
|
package/dist/pluginIndex.js
CHANGED
|
@@ -1,82 +1,91 @@
|
|
|
1
|
-
import "./chunk-JSBRDJBE.js";
|
|
2
|
-
|
|
3
|
-
// src/extensions/LinkExtension.ts
|
|
4
1
|
import path from "node:path";
|
|
5
|
-
import { noSuffix } from "wesl";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { link, noSuffix } from "wesl";
|
|
3
|
+
import url from "node:url";
|
|
4
|
+
import { resolve } from "import-meta-resolve";
|
|
5
|
+
|
|
6
|
+
//#region src/extensions/LinkExtension.ts
|
|
7
|
+
const linkBuildExtension = {
|
|
8
|
+
extensionName: "link",
|
|
9
|
+
emitFn: emitLinkJs
|
|
9
10
|
};
|
|
11
|
+
/** Emit a JavaScript LinkParams structure, ready for linking at runtime. */
|
|
10
12
|
async function emitLinkJs(baseId, api) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
const { resolvedWeslRoot, tomlDir } = await api.weslToml();
|
|
14
|
+
const weslSrc = await api.weslSrc();
|
|
15
|
+
const rootModule = await api.weslMain(baseId);
|
|
16
|
+
const rootModuleName = noSuffix(rootModule);
|
|
17
|
+
const tomlRelative = path.relative(tomlDir, resolvedWeslRoot);
|
|
18
|
+
const debugWeslRoot = tomlRelative.replaceAll(path.sep, "/");
|
|
19
|
+
const autoDeps = await api.weslDependencies();
|
|
20
|
+
const sanitizedDeps = autoDeps.map((dep) => dep.replaceAll("/", "_"));
|
|
21
|
+
const bundleImports = autoDeps.map((p, i) => `import ${sanitizedDeps[i]} from "${p}";`).join("\n");
|
|
22
|
+
const rootName = path.basename(rootModuleName);
|
|
23
|
+
const paramsName = `link${rootName}Config`;
|
|
24
|
+
const linkParams = {
|
|
25
|
+
rootModuleName,
|
|
26
|
+
weslSrc,
|
|
27
|
+
debugWeslRoot
|
|
28
|
+
};
|
|
29
|
+
const libsStr = `libs: [${sanitizedDeps.join(", ")}]`;
|
|
30
|
+
const linkParamsStr = `{
|
|
29
31
|
${serializeFields(linkParams)},
|
|
30
32
|
${libsStr},
|
|
31
33
|
}`;
|
|
32
|
-
|
|
34
|
+
const src = `
|
|
33
35
|
${bundleImports}
|
|
34
36
|
export const ${paramsName} = ${linkParamsStr};
|
|
35
37
|
export default ${paramsName};
|
|
36
38
|
`;
|
|
37
|
-
|
|
39
|
+
return src;
|
|
38
40
|
}
|
|
39
41
|
function serializeFields(record) {
|
|
40
|
-
|
|
42
|
+
return Object.entries(record).map(([k, v]) => ` ${k}: ${JSON.stringify(v, null, 2)}`).join(",\n");
|
|
41
43
|
}
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/extensions/StaticExtension.ts
|
|
47
|
+
/**
|
|
48
|
+
* a wesl-js ?static build extension that statically links from the root file
|
|
49
|
+
* and emits a JavaScript file containing the linked wgsl string.
|
|
50
|
+
*
|
|
51
|
+
* use it like this:
|
|
52
|
+
* import wgsl from "./shaders/app.wesl?static";
|
|
53
|
+
*
|
|
54
|
+
* or with conditions, like this:
|
|
55
|
+
* import wgsl from "../shaders/foo/app.wesl MOBILE=true FUN SAFE=false ?static";
|
|
56
|
+
*/
|
|
57
|
+
const staticBuildExtension = {
|
|
58
|
+
extensionName: "static",
|
|
59
|
+
emitFn: emitStaticJs
|
|
51
60
|
};
|
|
61
|
+
/** Emit a JavaScript file containing the wgsl string */
|
|
52
62
|
async function emitStaticJs(baseId, api, conditions) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
const { resolvedWeslRoot, tomlDir } = await api.weslToml();
|
|
64
|
+
const parentModule = url.pathToFileURL(path.join(tomlDir, "wesl.toml")).toString();
|
|
65
|
+
const dependencies = await api.weslDependencies();
|
|
66
|
+
const libFileUrls = dependencies.map((d) => resolve(d, parentModule));
|
|
67
|
+
const futureLibs = libFileUrls.map((f) => import(f));
|
|
68
|
+
const libModules = await Promise.all(futureLibs);
|
|
69
|
+
const libs = libModules.map((m) => m.default);
|
|
70
|
+
const weslSrc = await api.weslSrc();
|
|
71
|
+
const rootModule = await api.weslMain(baseId);
|
|
72
|
+
const rootModuleName = noSuffix(rootModule);
|
|
73
|
+
const tomlRelative = path.relative(tomlDir, resolvedWeslRoot);
|
|
74
|
+
const debugWeslRoot = tomlRelative.replaceAll(path.sep, "/");
|
|
75
|
+
const result = await link({
|
|
76
|
+
weslSrc,
|
|
77
|
+
rootModuleName,
|
|
78
|
+
debugWeslRoot,
|
|
79
|
+
libs,
|
|
80
|
+
conditions
|
|
81
|
+
});
|
|
82
|
+
const wgsl = result.dest;
|
|
83
|
+
const src = `
|
|
74
84
|
export const wgsl = \`${wgsl}\`;
|
|
75
85
|
export default wgsl;
|
|
76
86
|
`;
|
|
77
|
-
|
|
87
|
+
return src;
|
|
78
88
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
};
|
|
89
|
+
|
|
90
|
+
//#endregion
|
|
91
|
+
export { linkBuildExtension, staticBuildExtension };
|
package/dist/plugins/astro.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../PluginExtension-B_oge2T3.js';
|
|
3
|
-
import 'wesl';
|
|
1
|
+
import { WeslPluginOptions } from "../PluginExtension-B9OlwcsY.js";
|
|
4
2
|
|
|
3
|
+
//#region src/plugins/astro.d.ts
|
|
5
4
|
declare const _default: (options: WeslPluginOptions) => any;
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
//#endregion
|
|
7
|
+
export { _default as default };
|
package/dist/plugins/astro.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
WeslPlugin_default
|
|
3
|
-
} from "../chunk-LHNI4JI3.js";
|
|
4
|
-
import "../chunk-JSBRDJBE.js";
|
|
1
|
+
import { WeslPlugin_default } from "../WeslPlugin-DjY8zodn.js";
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
//#region src/plugins/astro.ts
|
|
7
4
|
var astro_default = (options) => ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
}
|
|
5
|
+
name: "wesl-plugin",
|
|
6
|
+
hooks: { "astro:config:setup": async (astro) => {
|
|
7
|
+
astro.config.vite.plugins ||= [];
|
|
8
|
+
astro.config.vite.plugins.push(WeslPlugin_default.vite(options));
|
|
9
|
+
} }
|
|
15
10
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { astro_default as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '../PluginExtension-B_oge2T3.js';
|
|
4
|
-
import 'wesl';
|
|
1
|
+
import { WeslPluginOptions } from "../PluginExtension-B9OlwcsY.js";
|
|
2
|
+
import * as esbuild12 from "esbuild";
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
//#region src/plugins/esbuild.d.ts
|
|
5
|
+
declare const _default: (options: WeslPluginOptions) => esbuild12.Plugin;
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
export { _default as default };
|
package/dist/plugins/esbuild.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
weslPlugin
|
|
3
|
-
} from "../chunk-LHNI4JI3.js";
|
|
4
|
-
import "../chunk-JSBRDJBE.js";
|
|
5
|
-
|
|
6
|
-
// src/plugins/esbuild.ts
|
|
1
|
+
import { weslPlugin } from "../WeslPlugin-DjY8zodn.js";
|
|
7
2
|
import { createEsbuildPlugin } from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/plugins/esbuild.ts
|
|
8
5
|
var esbuild_default = createEsbuildPlugin(weslPlugin);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { esbuild_default as default };
|
package/dist/plugins/farm.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '../PluginExtension-B_oge2T3.js';
|
|
4
|
-
import 'wesl';
|
|
1
|
+
import { WeslPluginOptions } from "../PluginExtension-B9OlwcsY.js";
|
|
2
|
+
import * as _farmfe_core8 from "@farmfe/core";
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
//#region src/plugins/farm.d.ts
|
|
5
|
+
declare const _default: (options: WeslPluginOptions) => _farmfe_core8.JsPlugin;
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
export { _default as default };
|
package/dist/plugins/farm.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
weslPlugin
|
|
3
|
-
} from "../chunk-LHNI4JI3.js";
|
|
4
|
-
import "../chunk-JSBRDJBE.js";
|
|
5
|
-
|
|
6
|
-
// src/plugins/farm.ts
|
|
1
|
+
import { weslPlugin } from "../WeslPlugin-DjY8zodn.js";
|
|
7
2
|
import { createFarmPlugin } from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/plugins/farm.ts
|
|
8
5
|
var farm_default = createFarmPlugin(weslPlugin);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { farm_default as default };
|
package/dist/plugins/nuxt.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '../PluginExtension-B_oge2T3.js';
|
|
4
|
-
import 'wesl';
|
|
1
|
+
import { WeslPluginOptions } from "../PluginExtension-B9OlwcsY.js";
|
|
2
|
+
import * as _nuxt_schema13 from "@nuxt/schema";
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
declare const _default:
|
|
4
|
+
//#region src/plugins/nuxt.d.ts
|
|
5
|
+
interface ModuleOptions extends WeslPluginOptions {}
|
|
6
|
+
declare const _default: _nuxt_schema13.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ModuleOptions, _default as default };
|
package/dist/plugins/nuxt.js
CHANGED
|
@@ -1,28 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
} from "../
|
|
4
|
-
import {
|
|
5
|
-
vite_default
|
|
6
|
-
} from "../chunk-ZK6IKQOJ.js";
|
|
7
|
-
import "../chunk-LHNI4JI3.js";
|
|
8
|
-
import "../chunk-JSBRDJBE.js";
|
|
9
|
-
|
|
10
|
-
// src/plugins/nuxt.ts
|
|
1
|
+
import "../WeslPlugin-DjY8zodn.js";
|
|
2
|
+
import { vite_default } from "../vite-Bx_gff8v.js";
|
|
3
|
+
import { webpack_default } from "../webpack-Bq0QiCAt.js";
|
|
11
4
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
12
5
|
import "@nuxt/schema";
|
|
6
|
+
|
|
7
|
+
//#region src/plugins/nuxt.ts
|
|
13
8
|
var nuxt_default = defineNuxtModule({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
addWebpackPlugin(() => webpack_default(options));
|
|
24
|
-
}
|
|
9
|
+
meta: {
|
|
10
|
+
name: "nuxt-wesl-plugin",
|
|
11
|
+
configKey: "unpluginStarter"
|
|
12
|
+
},
|
|
13
|
+
defaults: {},
|
|
14
|
+
setup(options, _nuxt) {
|
|
15
|
+
addVitePlugin(() => vite_default(options));
|
|
16
|
+
addWebpackPlugin(() => webpack_default(options));
|
|
17
|
+
}
|
|
25
18
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { nuxt_default as default };
|
package/dist/plugins/rollup.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '../PluginExtension-B_oge2T3.js';
|
|
4
|
-
import 'wesl';
|
|
1
|
+
import { WeslPluginOptions } from "../PluginExtension-B9OlwcsY.js";
|
|
2
|
+
import * as rollup5 from "rollup";
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
//#region src/plugins/rollup.d.ts
|
|
5
|
+
declare const _default: (options: WeslPluginOptions) => rollup5.Plugin<any> | rollup5.Plugin<any>[];
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
export { _default as default };
|
package/dist/plugins/rollup.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
weslPlugin
|
|
3
|
-
} from "../chunk-LHNI4JI3.js";
|
|
4
|
-
import "../chunk-JSBRDJBE.js";
|
|
5
|
-
|
|
6
|
-
// src/plugins/rollup.ts
|
|
1
|
+
import { weslPlugin } from "../WeslPlugin-DjY8zodn.js";
|
|
7
2
|
import { createRollupPlugin } from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/plugins/rollup.ts
|
|
8
5
|
var rollup_default = createRollupPlugin(weslPlugin);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { rollup_default as default };
|
package/dist/plugins/rspack.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../PluginExtension-B_oge2T3.js';
|
|
3
|
-
import 'wesl';
|
|
1
|
+
import { WeslPluginOptions } from "../PluginExtension-B9OlwcsY.js";
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
//#region src/plugins/rspack.d.ts
|
|
4
|
+
declare const _default: (options: WeslPluginOptions) => RspackPluginInstance;
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
//#endregion
|
|
7
|
+
export { _default as default };
|
package/dist/plugins/rspack.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
weslPlugin
|
|
3
|
-
} from "../chunk-LHNI4JI3.js";
|
|
4
|
-
import "../chunk-JSBRDJBE.js";
|
|
5
|
-
|
|
6
|
-
// src/plugins/rspack.ts
|
|
1
|
+
import { weslPlugin } from "../WeslPlugin-DjY8zodn.js";
|
|
7
2
|
import { createRspackPlugin } from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/plugins/rspack.ts
|
|
8
5
|
var rspack_default = createRspackPlugin(weslPlugin);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { rspack_default as default };
|
package/dist/plugins/vite.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '../PluginExtension-B_oge2T3.js';
|
|
4
|
-
import 'wesl';
|
|
1
|
+
import { WeslPluginOptions } from "../PluginExtension-B9OlwcsY.js";
|
|
2
|
+
import * as vite1 from "vite";
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
//#region src/plugins/vite.d.ts
|
|
5
|
+
declare const _default: (options: WeslPluginOptions) => vite1.Plugin<any> | vite1.Plugin<any>[];
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
export { _default as default };
|
package/dist/plugins/vite.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import "../chunk-JSBRDJBE.js";
|
|
6
|
-
export {
|
|
7
|
-
vite_default as default
|
|
8
|
-
};
|
|
1
|
+
import "../WeslPlugin-DjY8zodn.js";
|
|
2
|
+
import { vite_default } from "../vite-Bx_gff8v.js";
|
|
3
|
+
|
|
4
|
+
export { vite_default as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '../PluginExtension-B_oge2T3.js';
|
|
4
|
-
import 'wesl';
|
|
1
|
+
import { WeslPluginOptions } from "../PluginExtension-B9OlwcsY.js";
|
|
2
|
+
import * as webpack10 from "webpack";
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
//#region src/plugins/webpack.d.ts
|
|
5
|
+
declare const _default: (options: WeslPluginOptions) => webpack10.WebpackPluginInstance;
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
export { _default as default };
|
package/dist/plugins/webpack.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import "../chunk-JSBRDJBE.js";
|
|
6
|
-
export {
|
|
7
|
-
webpack_default as default
|
|
8
|
-
};
|
|
1
|
+
import "../WeslPlugin-DjY8zodn.js";
|
|
2
|
+
import { webpack_default } from "../webpack-Bq0QiCAt.js";
|
|
3
|
+
|
|
4
|
+
export { webpack_default as default };
|
package/package.json
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wesl-plugin",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.7",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"import-meta-resolve": "^4.1.0",
|
|
7
7
|
"toml": "^3.0.0",
|
|
8
|
-
"unplugin": "^2.3.
|
|
9
|
-
"wesl": "0.6.
|
|
8
|
+
"unplugin": "^2.3.4",
|
|
9
|
+
"wesl": "0.6.7",
|
|
10
|
+
"wesl-tooling": "0.6.7"
|
|
10
11
|
},
|
|
11
12
|
"devDependencies": {
|
|
12
|
-
"@nuxt/kit": "^3.17.
|
|
13
|
-
"@nuxt/schema": "^3.17.
|
|
14
|
-
"bumpp": "^10.1.
|
|
13
|
+
"@nuxt/kit": "^3.17.3",
|
|
14
|
+
"@nuxt/schema": "^3.17.3",
|
|
15
|
+
"bumpp": "^10.1.1",
|
|
15
16
|
"chalk": "^5.4.1",
|
|
16
17
|
"nodemon": "^3.1.10",
|
|
17
|
-
"rollup": "^4.
|
|
18
|
-
"
|
|
18
|
+
"rollup": "^4.41.0",
|
|
19
|
+
"tsdown": "^0.11.12",
|
|
19
20
|
"webpack": "^5.99.8"
|
|
20
21
|
},
|
|
21
22
|
"description": "",
|
|
@@ -92,8 +93,8 @@
|
|
|
92
93
|
},
|
|
93
94
|
"scripts": {
|
|
94
95
|
"echo": "echo",
|
|
95
|
-
"build": "
|
|
96
|
-
"dev": "
|
|
96
|
+
"build": "tsdown",
|
|
97
|
+
"dev": "tsdown --watch src --watch ../wesl/dist",
|
|
97
98
|
"lint": "eslint .",
|
|
98
99
|
"play": "npm -C playground run dev",
|
|
99
100
|
"typecheck": "tsc"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { bindAndTransform, bindingStructsPlugin
|
|
1
|
+
import { type LinkConfig, bindAndTransform, bindingStructsPlugin } from "wesl";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
bindingGroupLayoutTs,
|
|
4
|
+
reportBindingStructsPlugin,
|
|
5
5
|
} from "../../wesl/src/Reflection.ts"; // LATER fix import
|
|
6
|
-
import { PluginExtension, PluginExtensionApi } from "./PluginExtension.ts";
|
|
6
|
+
import type { PluginExtension, PluginExtensionApi } from "./PluginExtension.ts";
|
|
7
7
|
|
|
8
8
|
export const bindingLayoutExtension: PluginExtension = {
|
|
9
9
|
extensionName: "bindingLayout",
|