Skip to content

Commit 2351367

Browse files
committed
feat: organize packaegs
1 parent 66b1892 commit 2351367

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.4",
44
"description": "OpenAPI React Query Codegen",
55
"bin": {
6-
"openapi-rq": "dist/bin/cli.js"
6+
"openapi-rq": "dist/src/cli.js"
77
},
88
"scripts": {
99
"build": "tsc -p tsconfig.json",
@@ -32,14 +32,13 @@
3232
"author": "Daiki Urata (@7nohe)",
3333
"license": "MIT",
3434
"dependencies": {
35-
"commander": "^9.4.0"
36-
},
37-
"devDependencies": {
38-
"@types/glob": "^7.2.0",
39-
"@types/node": "^18.0.6",
35+
"commander": "^9.4.0",
4036
"glob": "^8.0.3",
41-
"openapi-types": "^12.0.0",
4237
"openapi-typescript-codegen": "^0.23.0",
4338
"typescript": "^4.7.4"
39+
},
40+
"devDependencies": {
41+
"@types/glob": "^7.2.0",
42+
"@types/node": "^18.0.6"
4443
}
4544
}

bin/cli.ts renamed to src/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 "../src/generate";
2+
import { generate } from "./generate";
33
import { Command } from "commander";
44
import packageJson from "../package.json";
55

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 "../bin/cli";
3+
import { CLIOptions } from "./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 "../bin/cli";
3+
import { CLIOptions } from "./cli";
44

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

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"lib": ["ESNext", "DOM"]
1313
},
1414
"include": [
15-
"bin"
16-
],
15+
"src"
16+
],
1717
}

0 commit comments

Comments
 (0)