@collie-lang/vite 1.0.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.
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/index.cjs +93 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +62 -0
- package/dist/index.js.map +1 -0
- package/package.json +40 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Collie Coders
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
default: () => colliePlugin
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(index_exports);
|
|
36
|
+
var import_node_path = __toESM(require("path"), 1);
|
|
37
|
+
var import_promises = __toESM(require("fs/promises"), 1);
|
|
38
|
+
var import_vite = require("vite");
|
|
39
|
+
var import_compiler = require("@collie-lang/compiler");
|
|
40
|
+
function stripQuery(id) {
|
|
41
|
+
const q = id.indexOf("?");
|
|
42
|
+
return q === -1 ? id : id.slice(0, q);
|
|
43
|
+
}
|
|
44
|
+
function isCollieFile(id) {
|
|
45
|
+
return stripQuery(id).endsWith(".collie");
|
|
46
|
+
}
|
|
47
|
+
function toComponentNameHint(id) {
|
|
48
|
+
const base = import_node_path.default.basename(stripQuery(id)).replace(/\.[^.]+$/, "");
|
|
49
|
+
return `${base.replace(/[^a-zA-Z0-9_$]/g, "")}Template`;
|
|
50
|
+
}
|
|
51
|
+
function formatDiagnostic(id, diagnostic) {
|
|
52
|
+
const file = diagnostic.file ?? stripQuery(id);
|
|
53
|
+
const where = diagnostic.span ? `${diagnostic.span.start.line}:${diagnostic.span.start.col}` : "";
|
|
54
|
+
const location = where ? `${file}:${where}` : file;
|
|
55
|
+
const code = diagnostic.code ? diagnostic.code : "COLLIE";
|
|
56
|
+
return `${location} [${code}] ${diagnostic.message}`;
|
|
57
|
+
}
|
|
58
|
+
function colliePlugin(options = {}) {
|
|
59
|
+
let resolvedRuntime = options.jsxRuntime ?? "automatic";
|
|
60
|
+
return {
|
|
61
|
+
name: "collie",
|
|
62
|
+
enforce: "pre",
|
|
63
|
+
configResolved() {
|
|
64
|
+
resolvedRuntime = options.jsxRuntime ?? "automatic";
|
|
65
|
+
},
|
|
66
|
+
async load(id) {
|
|
67
|
+
if (!isCollieFile(id)) return null;
|
|
68
|
+
const filePath = stripQuery(id);
|
|
69
|
+
const source = await import_promises.default.readFile(filePath, "utf-8");
|
|
70
|
+
const result = (0, import_compiler.compileToTsx)(source, {
|
|
71
|
+
filename: filePath,
|
|
72
|
+
componentNameHint: toComponentNameHint(filePath),
|
|
73
|
+
jsxRuntime: resolvedRuntime
|
|
74
|
+
});
|
|
75
|
+
const errors = result.diagnostics.filter((d) => d.severity === "error");
|
|
76
|
+
if (errors.length) {
|
|
77
|
+
const formatted = errors.map((diag) => formatDiagnostic(filePath, diag)).join("\n");
|
|
78
|
+
this.error(new Error(`[collie]
|
|
79
|
+
${formatted}`));
|
|
80
|
+
}
|
|
81
|
+
const transformed = await (0, import_vite.transformWithEsbuild)(result.code, filePath, {
|
|
82
|
+
loader: "tsx",
|
|
83
|
+
jsx: "automatic",
|
|
84
|
+
jsxImportSource: "react"
|
|
85
|
+
});
|
|
86
|
+
return {
|
|
87
|
+
code: transformed.code,
|
|
88
|
+
map: transformed.map ?? null
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import path from \"node:path\";\nimport fs from \"node:fs/promises\";\nimport type { Plugin } from \"vite\";\nimport { transformWithEsbuild } from \"vite\";\nimport type { Diagnostic } from \"@collie-lang/compiler\";\nimport { compileToTsx } from \"@collie-lang/compiler\";\n\ntype JsxRuntime = \"automatic\" | \"classic\";\n\nexport interface ColliePluginOptions {\n jsxRuntime?: JsxRuntime;\n}\n\nfunction stripQuery(id: string): string {\n const q = id.indexOf(\"?\");\n return q === -1 ? id : id.slice(0, q);\n}\n\nfunction isCollieFile(id: string): boolean {\n return stripQuery(id).endsWith(\".collie\");\n}\n\nfunction toComponentNameHint(id: string): string {\n const base = path.basename(stripQuery(id)).replace(/\\.[^.]+$/, \"\");\n return `${base.replace(/[^a-zA-Z0-9_$]/g, \"\")}Template`;\n}\n\nfunction formatDiagnostic(id: string, diagnostic: Diagnostic): string {\n const file = diagnostic.file ?? stripQuery(id);\n const where = diagnostic.span ? `${diagnostic.span.start.line}:${diagnostic.span.start.col}` : \"\";\n const location = where ? `${file}:${where}` : file;\n const code = diagnostic.code ? diagnostic.code : \"COLLIE\";\n return `${location} [${code}] ${diagnostic.message}`;\n}\n\nexport default function colliePlugin(options: ColliePluginOptions = {}): Plugin {\n let resolvedRuntime: JsxRuntime = options.jsxRuntime ?? \"automatic\";\n\n return {\n name: \"collie\",\n enforce: \"pre\",\n\n configResolved() {\n resolvedRuntime = options.jsxRuntime ?? \"automatic\";\n },\n\n async load(id) {\n if (!isCollieFile(id)) return null;\n\n const filePath = stripQuery(id);\n const source = await fs.readFile(filePath, \"utf-8\");\n\n const result = compileToTsx(source, {\n filename: filePath,\n componentNameHint: toComponentNameHint(filePath),\n jsxRuntime: resolvedRuntime\n });\n\n const errors = result.diagnostics.filter((d) => d.severity === \"error\");\n if (errors.length) {\n const formatted = errors.map((diag) => formatDiagnostic(filePath, diag)).join(\"\\n\");\n this.error(new Error(`[collie]\\n${formatted}`));\n }\n\n // Compiler output contains JSX. Transform it to plain JS so Rollup can parse.\n const transformed = await transformWithEsbuild(result.code, filePath, {\n loader: \"tsx\",\n jsx: \"automatic\",\n jsxImportSource: \"react\"\n });\n\n return {\n code: transformed.code,\n map: transformed.map ?? null\n };\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAiB;AACjB,sBAAe;AAEf,kBAAqC;AAErC,sBAA6B;AAQ7B,SAAS,WAAW,IAAoB;AACtC,QAAM,IAAI,GAAG,QAAQ,GAAG;AACxB,SAAO,MAAM,KAAK,KAAK,GAAG,MAAM,GAAG,CAAC;AACtC;AAEA,SAAS,aAAa,IAAqB;AACzC,SAAO,WAAW,EAAE,EAAE,SAAS,SAAS;AAC1C;AAEA,SAAS,oBAAoB,IAAoB;AAC/C,QAAM,OAAO,iBAAAA,QAAK,SAAS,WAAW,EAAE,CAAC,EAAE,QAAQ,YAAY,EAAE;AACjE,SAAO,GAAG,KAAK,QAAQ,mBAAmB,EAAE,CAAC;AAC/C;AAEA,SAAS,iBAAiB,IAAY,YAAgC;AACpE,QAAM,OAAO,WAAW,QAAQ,WAAW,EAAE;AAC7C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 -0,0 +1,9 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
|
+
|
|
3
|
+
type JsxRuntime = "automatic" | "classic";
|
|
4
|
+
interface ColliePluginOptions {
|
|
5
|
+
jsxRuntime?: JsxRuntime;
|
|
6
|
+
}
|
|
7
|
+
declare function colliePlugin(options?: ColliePluginOptions): Plugin;
|
|
8
|
+
|
|
9
|
+
export { type ColliePluginOptions, colliePlugin as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
|
+
|
|
3
|
+
type JsxRuntime = "automatic" | "classic";
|
|
4
|
+
interface ColliePluginOptions {
|
|
5
|
+
jsxRuntime?: JsxRuntime;
|
|
6
|
+
}
|
|
7
|
+
declare function colliePlugin(options?: ColliePluginOptions): Plugin;
|
|
8
|
+
|
|
9
|
+
export { type ColliePluginOptions, colliePlugin as default };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import path from "path";
|
|
3
|
+
import fs from "fs/promises";
|
|
4
|
+
import { transformWithEsbuild } from "vite";
|
|
5
|
+
import { compileToTsx } from "@collie-lang/compiler";
|
|
6
|
+
function stripQuery(id) {
|
|
7
|
+
const q = id.indexOf("?");
|
|
8
|
+
return q === -1 ? id : id.slice(0, q);
|
|
9
|
+
}
|
|
10
|
+
function isCollieFile(id) {
|
|
11
|
+
return stripQuery(id).endsWith(".collie");
|
|
12
|
+
}
|
|
13
|
+
function toComponentNameHint(id) {
|
|
14
|
+
const base = path.basename(stripQuery(id)).replace(/\.[^.]+$/, "");
|
|
15
|
+
return `${base.replace(/[^a-zA-Z0-9_$]/g, "")}Template`;
|
|
16
|
+
}
|
|
17
|
+
function formatDiagnostic(id, diagnostic) {
|
|
18
|
+
const file = diagnostic.file ?? stripQuery(id);
|
|
19
|
+
const where = diagnostic.span ? `${diagnostic.span.start.line}:${diagnostic.span.start.col}` : "";
|
|
20
|
+
const location = where ? `${file}:${where}` : file;
|
|
21
|
+
const code = diagnostic.code ? diagnostic.code : "COLLIE";
|
|
22
|
+
return `${location} [${code}] ${diagnostic.message}`;
|
|
23
|
+
}
|
|
24
|
+
function colliePlugin(options = {}) {
|
|
25
|
+
let resolvedRuntime = options.jsxRuntime ?? "automatic";
|
|
26
|
+
return {
|
|
27
|
+
name: "collie",
|
|
28
|
+
enforce: "pre",
|
|
29
|
+
configResolved() {
|
|
30
|
+
resolvedRuntime = options.jsxRuntime ?? "automatic";
|
|
31
|
+
},
|
|
32
|
+
async load(id) {
|
|
33
|
+
if (!isCollieFile(id)) return null;
|
|
34
|
+
const filePath = stripQuery(id);
|
|
35
|
+
const source = await fs.readFile(filePath, "utf-8");
|
|
36
|
+
const result = compileToTsx(source, {
|
|
37
|
+
filename: filePath,
|
|
38
|
+
componentNameHint: toComponentNameHint(filePath),
|
|
39
|
+
jsxRuntime: resolvedRuntime
|
|
40
|
+
});
|
|
41
|
+
const errors = result.diagnostics.filter((d) => d.severity === "error");
|
|
42
|
+
if (errors.length) {
|
|
43
|
+
const formatted = errors.map((diag) => formatDiagnostic(filePath, diag)).join("\n");
|
|
44
|
+
this.error(new Error(`[collie]
|
|
45
|
+
${formatted}`));
|
|
46
|
+
}
|
|
47
|
+
const transformed = await transformWithEsbuild(result.code, filePath, {
|
|
48
|
+
loader: "tsx",
|
|
49
|
+
jsx: "automatic",
|
|
50
|
+
jsxImportSource: "react"
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
code: transformed.code,
|
|
54
|
+
map: transformed.map ?? null
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
colliePlugin as default
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import path from \"node:path\";\nimport fs from \"node:fs/promises\";\nimport type { Plugin } from \"vite\";\nimport { transformWithEsbuild } from \"vite\";\nimport type { Diagnostic } from \"@collie-lang/compiler\";\nimport { compileToTsx } from \"@collie-lang/compiler\";\n\ntype JsxRuntime = \"automatic\" | \"classic\";\n\nexport interface ColliePluginOptions {\n jsxRuntime?: JsxRuntime;\n}\n\nfunction stripQuery(id: string): string {\n const q = id.indexOf(\"?\");\n return q === -1 ? id : id.slice(0, q);\n}\n\nfunction isCollieFile(id: string): boolean {\n return stripQuery(id).endsWith(\".collie\");\n}\n\nfunction toComponentNameHint(id: string): string {\n const base = path.basename(stripQuery(id)).replace(/\\.[^.]+$/, \"\");\n return `${base.replace(/[^a-zA-Z0-9_$]/g, \"\")}Template`;\n}\n\nfunction formatDiagnostic(id: string, diagnostic: Diagnostic): string {\n const file = diagnostic.file ?? stripQuery(id);\n const where = diagnostic.span ? `${diagnostic.span.start.line}:${diagnostic.span.start.col}` : \"\";\n const location = where ? `${file}:${where}` : file;\n const code = diagnostic.code ? diagnostic.code : \"COLLIE\";\n return `${location} [${code}] ${diagnostic.message}`;\n}\n\nexport default function colliePlugin(options: ColliePluginOptions = {}): Plugin {\n let resolvedRuntime: JsxRuntime = options.jsxRuntime ?? \"automatic\";\n\n return {\n name: \"collie\",\n enforce: \"pre\",\n\n configResolved() {\n resolvedRuntime = options.jsxRuntime ?? \"automatic\";\n },\n\n async load(id) {\n if (!isCollieFile(id)) return null;\n\n const filePath = stripQuery(id);\n const source = await fs.readFile(filePath, \"utf-8\");\n\n const result = compileToTsx(source, {\n filename: filePath,\n componentNameHint: toComponentNameHint(filePath),\n jsxRuntime: resolvedRuntime\n });\n\n const errors = result.diagnostics.filter((d) => d.severity === \"error\");\n if (errors.length) {\n const formatted = errors.map((diag) => formatDiagnostic(filePath, diag)).join(\"\\n\");\n this.error(new Error(`[collie]\\n${formatted}`));\n }\n\n // Compiler output contains JSX. Transform it to plain JS so Rollup can parse.\n const transformed = await transformWithEsbuild(result.code, filePath, {\n loader: \"tsx\",\n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;AAAA,QAClC,UAAU;AAAA,QACV,mBAAmB,oBAAoB,QAAQ;AAAA,QAC/C,YAAY;AAAA,MACd,CAAC;AAED,YAAM,SAAS,OAAO,YAAY,OAAO,CAAC,MAAM,EAAE,aAAa,OAAO;AACtE,UAAI,OAAO,QAAQ;AACjB,cAAM,YAAY,OAAO,IAAI,CAAC,SAAS,iBAAiB,UAAU,IAAI,CAAC,EAAE,KAAK,IAAI;AAClF,aAAK,MAAM,IAAI,MAAM;AAAA,EAAa,SAAS,EAAE,CAAC;AAAA,MAChD;AAGA,YAAM,cAAc,MAAM,qBAAqB,OAAO,MAAM,UAAU;AAAA,QACpE,QAAQ;AAAA,QACR,KAAK;AAAA,QACL,iBAAiB;AAAA,MACnB,CAAC;AAED,aAAO;AAAA,QACL,MAAM,YAAY;AAAA,QAClB,KAAK,YAAY,OAAO;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@collie-lang/vite",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Vite plugin for Collie (.collie -> React component).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@collie-lang/compiler": "1.0.0"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"vite": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"vite": "^7.3.0",
|
|
31
|
+
"typescript": "^5.7.2"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsup",
|
|
35
|
+
"dev": "tsup --watch",
|
|
36
|
+
"clean": "rimraf dist",
|
|
37
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
38
|
+
"lint": "echo \"(mvp) no lint configured\""
|
|
39
|
+
}
|
|
40
|
+
}
|