Skip to content

Commit 6fd194b

Browse files
committed
fix: unable to execute command
1 parent d594b91 commit 6fd194b

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

src/cli.ts renamed to bin/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env node
2-
import { generate } from "./generate";
2+
import { generate } from "../src/generate";
33
import { Command } from "commander";
44
import packageJson from "../package.json";
55

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.1",
44
"description": "OpenAPI React Query Codegen",
55
"bin": {
6-
"openapi-rq": "src/cli.js"
6+
"openapi-rq": "bin/cli.js"
77
},
88
"scripts": {
99
"build": "tsc -p tsconfig.json",

src/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { generate as generateTSClients } from "openapi-typescript-codegen";
22
import { print } from "./print";
3-
import { CLIOptions } from "./cli";
3+
import { CLIOptions } from "../bin/cli";
44
import path from "path";
55
import { createSource } from "./createSource";
66

src/print.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from "fs";
22
import path from "path";
3-
import { CLIOptions } from "./cli";
3+
import { CLIOptions } from "../bin/cli";
44

55
function printGeneratedTS(result: string, options: CLIOptions) {
66
const dir = path.join(options.outputDir, "queries")

tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@
1111
"outDir": "dist",
1212
"lib": ["ESNext", "DOM"]
1313
},
14-
"files": ["src/cli.ts"]
14+
"include": [
15+
"bin",
16+
"package.json"
17+
],
1518
}

0 commit comments

Comments
 (0)