This commit is contained in:
Nick Guerrera 2021-03-09 19:36:43 -08:00
Родитель 49385ddfb5
Коммит a424d2d68b
3 изменённых файлов: 8 добавлений и 1 удалений

5
packages/adl/cli-shim.js Normal file
Просмотреть файл

@ -0,0 +1,5 @@
#!/usr/bin/env node
// Workaround for https://github.com/microsoft/rushstack/issues/2400
// We can't use a file that may not have been built yet in package.json bin
await import("./dist/compiler/cli.js");

Просмотреть файл

@ -11,6 +11,7 @@ import { DiagnosticError, dumpError, logDiagnostics } from "./diagnostics.js";
import { adlVersion } from "./util.js"; import { adlVersion } from "./util.js";
const args = yargs(process.argv.slice(2)) const args = yargs(process.argv.slice(2))
.scriptName("adl")
.help() .help()
.strict() .strict()
.command("compile <path>", "Compile a directory of ADL files.", (cmd) => { .command("compile <path>", "Compile a directory of ADL files.", (cmd) => {

Просмотреть файл

@ -4,7 +4,7 @@
"description": "ADL Compiler Preview", "description": "ADL Compiler Preview",
"main": "dist/main.js", "main": "dist/main.js",
"bin": { "bin": {
"adl": "dist/compiler/cli.js" "adl": "cli-shim.js"
}, },
"engines": { "engines": {
"node": ">=14.0.0" "node": ">=14.0.0"
@ -35,6 +35,7 @@
"homepage": "https://github.com/Azure/adl#readme", "homepage": "https://github.com/Azure/adl#readme",
"readme": "https://github.com/Azure/adl/blob/master/readme.md", "readme": "https://github.com/Azure/adl/blob/master/readme.md",
"files": [ "files": [
"cli-shim.js",
"lib/*.adl", "lib/*.adl",
"dist/**", "dist/**",
"readme.md", "readme.md",