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
deps first
danabra.mov
5 months ago
8d38144f
50477420
+14
-16
1 changed file
expand all
collapse all
unified
split
packages
cli
src
commands
init.ts
+14
-16
packages/cli/src/commands/init.ts
···
47
const externalsTspPath = resolve(typelexDir, "externals.tsp");
48
49
console.log("Initializing typelex project...\n");
50
-
51
-
// Prompt for namespace
52
-
let namespace = await promptNamespace();
53
-
54
-
// Validate namespace format
55
-
while (!namespace.endsWith(".*")) {
56
-
console.error(`Error: namespace must end with .*`);
57
-
console.error(`Got: ${namespace}\n`);
58
-
namespace = await promptNamespace();
59
-
}
60
-
61
-
// Remove the .* suffix for use in template
62
-
const namespacePrefix = namespace.slice(0, -2);
63
-
64
-
// Install dependencies first
65
-
console.log("\nInstalling dependencies...\n");
66
67
// Detect package manager
68
let packageManager = "npm";
···
104
reject(err);
105
});
106
});
0
0
0
0
0
0
0
0
0
0
0
0
0
107
108
// Create typelex directory
109
await mkdir(typelexDir, { recursive: true });
···
47
const externalsTspPath = resolve(typelexDir, "externals.tsp");
48
49
console.log("Initializing typelex project...\n");
50
+
console.log("Installing dependencies...\n");
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
51
52
// Detect package manager
53
let packageManager = "npm";
···
89
reject(err);
90
});
91
});
92
+
93
+
// Prompt for namespace after successful installation
94
+
let namespace = await promptNamespace();
95
+
96
+
// Validate namespace format
97
+
while (!namespace.endsWith(".*")) {
98
+
console.error(`Error: namespace must end with .*`);
99
+
console.error(`Got: ${namespace}\n`);
100
+
namespace = await promptNamespace();
101
+
}
102
+
103
+
// Remove the .* suffix for use in template
104
+
const namespacePrefix = namespace.slice(0, -2);
105
106
// Create typelex directory
107
await mkdir(typelexDir, { recursive: true });