@swiftuijs/twill-export 0.3.1 → 0.4.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/README.md +5 -0
- package/dist/cli.js +1 -2
- package/dist/index.js +1 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# <img src="https://twill.evecalm.com/logo.png" alt="Twill hummingbird" align="right" width="40" height="40" /> Twill source export
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@swiftuijs/twill-export)
|
|
4
|
+
[](https://www.npmjs.com/package/@swiftuijs/twill-export)
|
|
5
|
+
[](https://github.com/swiftuijs/twill/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/swiftuijs/twill/blob/main/LICENSE)
|
|
7
|
+
|
|
3
8
|
`@swiftuijs/twill-export` exports checked Twill projects to native TS/TSX. Twill is a TypeScript-based language with Swift-inspired syntax extensions. The package supplies the optional `twill export` subcommand and a programmatic API; applications do not ship it. Node 20.19+ or 22.12+ is required.
|
|
4
9
|
|
|
5
10
|
Install the compiler and optional export package into your application, then run:
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { exportProject } from "./index.js";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { parseArgs } from "node:util";
|
|
4
|
-
|
|
4
|
+
// src/cli.twill
|
|
5
5
|
async function main(args = process.argv.slice(2)) {
|
|
6
6
|
const { values, positionals } = parseArgs({
|
|
7
7
|
args,
|
|
@@ -44,7 +44,6 @@ async function main(args = process.argv.slice(2)) {
|
|
|
44
44
|
}
|
|
45
45
|
return result.diagnostics.some((item) => item.category === "error") ? 1 : 0;
|
|
46
46
|
}
|
|
47
|
-
//#endregion
|
|
48
47
|
export { main };
|
|
49
48
|
|
|
50
49
|
//# sourceMappingURL=cli.js.map
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { isTwillFile } from "@swiftuijs/twill";
|
|
|
5
5
|
import { formatGenerated } from "@swiftuijs/twill-formatter";
|
|
6
6
|
import { lstatSync, mkdirSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
8
|
-
|
|
8
|
+
// src/index.twill
|
|
9
9
|
var nativeName = (name) => name.replace(/\.twillx$/, ".tsx").replace(/\.twill$/, ".ts");
|
|
10
10
|
var portable = (path) => path.replaceAll("\\", "/");
|
|
11
11
|
var inside = (root, path) => {
|
|
@@ -202,7 +202,6 @@ async function exportProject(tsconfig, options) {
|
|
|
202
202
|
project.dispose();
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
//#endregion
|
|
206
205
|
export { exportProject };
|
|
207
206
|
|
|
208
207
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swiftuijs/twill-export",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Export a checked Twill source project to formatted native TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"prettier": "^3.9.9",
|
|
40
40
|
"typescript": "5.9.3",
|
|
41
41
|
"magic-string": "^1.4.2",
|
|
42
|
-
"@swiftuijs/twill": "0.
|
|
43
|
-
"@swiftuijs/twill-formatter": "0.
|
|
42
|
+
"@swiftuijs/twill": "0.4.0",
|
|
43
|
+
"@swiftuijs/twill-formatter": "0.4.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"vite": "^8.3.
|
|
46
|
+
"vite": "^8.3.5",
|
|
47
47
|
"@types/node": "^26.6.4",
|
|
48
48
|
"vitest": "^5.0.3",
|
|
49
49
|
"@vitest/coverage-v8": "^5.0.3"
|