rooklang 0.3.0 → 0.3.1
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/cli.js +4 -2
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -130,8 +130,10 @@ function buildFiles(entries, options) {
|
|
|
130
130
|
* the compiled code from a directory of the run, removed after it.
|
|
131
131
|
*/
|
|
132
132
|
function runFile(file, typeCheck, markup) {
|
|
133
|
-
|
|
134
|
-
const
|
|
133
|
+
// The build rewrites the extensions of imports, not of these URLs: in the package they are .js.
|
|
134
|
+
const extension = import.meta.url.endsWith('.ts') ? '.ts' : '.js';
|
|
135
|
+
const loader = new URL(`./loader${extension}`, import.meta.url).href;
|
|
136
|
+
const run = fileURLToPath(new URL(`./run${extension}`, import.meta.url));
|
|
135
137
|
const cache = mkdtempSync(join(tmpdir(), 'rook-run-'));
|
|
136
138
|
try {
|
|
137
139
|
const { status, signal } = spawnSync(process.execPath, ['--import', loader, run, file], {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rooklang",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "A language with JavaScript semantics, Go-style syntax, goroutines on real threads and static types that compiles to readable JavaScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rooklang",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"site:dev": "vite",
|
|
58
58
|
"site:build": "vite build",
|
|
59
59
|
"site": "npm run site:build && node src/cli.ts run site/server.rk",
|
|
60
|
+
"site:images": "node scripts/og-image.ts",
|
|
60
61
|
"vscode:build": "node scripts/build-vscode.ts",
|
|
61
62
|
"vscode:package": "npm run vscode:build && cd editors/vscode && npx --yes @vscode/vsce@4 package --no-dependencies --allow-missing-repository --skip-license --out rooklang.vsix",
|
|
62
63
|
"vscode:install": "npm run vscode:package && code --install-extension editors/vscode/rooklang.vsix --force",
|