tangled
alpha
login
or
join now
danabra.mov
/
typelex
56
fork
atom
An experimental TypeSpec syntax for Lexicon
56
fork
atom
overview
issues
1
pulls
2
pipelines
0.2.5
danabra.mov
5 months ago
c80e1d7f
6fb0a8d0
+4
-4
2 changed files
expand all
collapse all
unified
split
packages
cli
package.json
src
commands
init.ts
+1
-1
packages/cli/package.json
···
1
1
{
2
2
"name": "@typelex/cli",
3
3
-
"version": "0.2.4",
3
3
+
"version": "0.2.5",
4
4
"main": "dist/index.js",
5
5
"type": "module",
6
6
"bin": {
+3
-3
packages/cli/src/commands/init.ts
···
1
1
-
import { resolve } from "path";
1
1
+
import { resolve, relative } from "path";
2
2
import { mkdir, writeFile, readFile, access } from "fs/promises";
3
3
import { spawn } from "child_process";
4
4
import { createInterface } from "readline";
···
82
82
const lexiconsPath = resolve(currentDir, "lexicons");
83
83
await access(lexiconsPath);
84
84
// Calculate relative path from cwd to this lexicons directory
85
85
-
const relative = require("path").relative(cwd, lexiconsPath);
86
86
-
lexiconsDir = relative;
85
85
+
const relativePath = relative(cwd, lexiconsPath);
86
86
+
lexiconsDir = relativePath;
87
87
} catch {
88
88
// Continue
89
89
}