@gi-tcg/unplugin-gts 0.4.1 → 0.4.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/dist/bun.js +1 -1
- package/dist/esbuild.js +1 -1
- package/dist/unloader.d.ts +2 -1
- package/dist/unloader.js +1 -1
- package/dist/{unplugin-C0MRSp4g.js → unplugin-SISrW4G5.js} +5 -2
- package/dist/unplugin.d.ts +2 -1
- package/dist/unplugin.js +5 -2
- package/dist/vite.js +1 -1
- package/dist/webpack.js +1 -1
- package/package.json +2 -2
- package/src/unplugin.ts +4 -1
package/dist/bun.js
CHANGED
package/dist/esbuild.js
CHANGED
package/dist/unloader.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { UnpluginInstance } from "unplugin";
|
|
2
|
-
import { TranspileOption } from "@gi-tcg/gts-transpiler";
|
|
2
|
+
import { PathModule, TranspileOption } from "@gi-tcg/gts-transpiler";
|
|
3
3
|
|
|
4
4
|
//#region src/unplugin.d.ts
|
|
5
5
|
interface TranspileSyncOption extends TranspileOption {
|
|
6
|
+
pathModule?: PathModule;
|
|
6
7
|
readFileFn: (path: string, encoding: "utf8") => string;
|
|
7
8
|
}
|
|
8
9
|
//#endregion
|
package/dist/unloader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as unpluginSyncFactory } from "./unplugin-
|
|
1
|
+
import { n as unpluginSyncFactory } from "./unplugin-SISrW4G5.js";
|
|
2
2
|
import { createUnloaderPlugin } from "unplugin";
|
|
3
3
|
//#region src/unloader.ts
|
|
4
4
|
var unloader_default = createUnloaderPlugin(unpluginSyncFactory);
|
|
@@ -27,8 +27,11 @@ const unpluginSyncFactory = (option) => {
|
|
|
27
27
|
transform: {
|
|
28
28
|
filter: { id: /\.gts$/ },
|
|
29
29
|
handler(source, id) {
|
|
30
|
-
const { readFileFn, ...restOption } = option;
|
|
31
|
-
const { code, sourceMap } = transpile(source, id, resolveGtsConfigSync(id, restOption, {
|
|
30
|
+
const { readFileFn, pathModule, ...restOption } = option;
|
|
31
|
+
const { code, sourceMap } = transpile(source, id, resolveGtsConfigSync(id, restOption, {
|
|
32
|
+
readFileFn,
|
|
33
|
+
pathModule
|
|
34
|
+
}));
|
|
32
35
|
return {
|
|
33
36
|
code,
|
|
34
37
|
map: sourceMap
|
package/dist/unplugin.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { UnpluginFactory } from "unplugin";
|
|
2
|
-
import { TranspileOption } from "@gi-tcg/gts-transpiler";
|
|
2
|
+
import { PathModule, TranspileOption } from "@gi-tcg/gts-transpiler";
|
|
3
3
|
|
|
4
4
|
//#region src/unplugin.d.ts
|
|
5
5
|
declare const unpluginFactory: UnpluginFactory<TranspileOption | undefined>;
|
|
6
6
|
interface TranspileSyncOption extends TranspileOption {
|
|
7
|
+
pathModule?: PathModule;
|
|
7
8
|
readFileFn: (path: string, encoding: "utf8") => string;
|
|
8
9
|
}
|
|
9
10
|
declare const unpluginSyncFactory: UnpluginFactory<TranspileSyncOption>;
|
package/dist/unplugin.js
CHANGED
|
@@ -27,8 +27,11 @@ const unpluginSyncFactory = (option) => {
|
|
|
27
27
|
transform: {
|
|
28
28
|
filter: { id: /\.gts$/ },
|
|
29
29
|
handler(source, id) {
|
|
30
|
-
const { readFileFn, ...restOption } = option;
|
|
31
|
-
const { code, sourceMap } = transpile(source, id, resolveGtsConfigSync(id, restOption, {
|
|
30
|
+
const { readFileFn, pathModule, ...restOption } = option;
|
|
31
|
+
const { code, sourceMap } = transpile(source, id, resolveGtsConfigSync(id, restOption, {
|
|
32
|
+
readFileFn,
|
|
33
|
+
pathModule
|
|
34
|
+
}));
|
|
32
35
|
return {
|
|
33
36
|
code,
|
|
34
37
|
map: sourceMap
|
package/dist/vite.js
CHANGED
package/dist/webpack.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gi-tcg/unplugin-gts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/piovium/gts.git"
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"dependencies": {
|
|
128
128
|
"@types/bun": "^1.3.6",
|
|
129
129
|
"unplugin": "npm:@gytx/unplugin@3.1.0-patch.2",
|
|
130
|
-
"@gi-tcg/gts-transpiler": "0.4.
|
|
130
|
+
"@gi-tcg/gts-transpiler": "0.4.2"
|
|
131
131
|
},
|
|
132
132
|
"devDependencies": {
|
|
133
133
|
"@types/node": "^24.3.0"
|
package/src/unplugin.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
type TranspileOption,
|
|
4
4
|
resolveGtsConfig,
|
|
5
5
|
resolveGtsConfigSync,
|
|
6
|
+
type PathModule,
|
|
6
7
|
} from "@gi-tcg/gts-transpiler";
|
|
7
8
|
import type { UnpluginFactory } from "unplugin";
|
|
8
9
|
|
|
@@ -29,6 +30,7 @@ export const unpluginFactory: UnpluginFactory<TranspileOption | undefined> = (
|
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
export interface TranspileSyncOption extends TranspileOption {
|
|
33
|
+
pathModule?: PathModule;
|
|
32
34
|
readFileFn: (path: string, encoding: "utf8") => string;
|
|
33
35
|
}
|
|
34
36
|
|
|
@@ -49,9 +51,10 @@ export const unpluginSyncFactory: UnpluginFactory<TranspileSyncOption> = (
|
|
|
49
51
|
transform: {
|
|
50
52
|
filter: { id: /\.gts$/ },
|
|
51
53
|
handler(source, id) {
|
|
52
|
-
const { readFileFn, ...restOption } = option;
|
|
54
|
+
const { readFileFn, pathModule, ...restOption } = option;
|
|
53
55
|
const resolvedOption = resolveGtsConfigSync(id, restOption, {
|
|
54
56
|
readFileFn,
|
|
57
|
+
pathModule,
|
|
55
58
|
});
|
|
56
59
|
const { code, sourceMap } = transpile(source, id, resolvedOption);
|
|
57
60
|
return {
|