Skip to content

Commit

Permalink
feat: organize packaegs
Browse files Browse the repository at this point in the history
  • Loading branch information
7nohe committed Jul 24, 2022
1 parent 66b1892 commit 2351367
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.4",
"description": "OpenAPI React Query Codegen",
"bin": {
"openapi-rq": "dist/bin/cli.js"
"openapi-rq": "dist/src/cli.js"
},
"scripts": {
"build": "tsc -p tsconfig.json",
Expand Down Expand Up @@ -32,14 +32,13 @@
"author": "Daiki Urata (@7nohe)",
"license": "MIT",
"dependencies": {
"commander": "^9.4.0"
},
"devDependencies": {
"@types/glob": "^7.2.0",
"@types/node": "^18.0.6",
"commander": "^9.4.0",
"glob": "^8.0.3",
"openapi-types": "^12.0.0",
"openapi-typescript-codegen": "^0.23.0",
"typescript": "^4.7.4"
},
"devDependencies": {
"@types/glob": "^7.2.0",
"@types/node": "^18.0.6"
}
}
2 changes: 1 addition & 1 deletion bin/cli.ts → src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
import { generate } from "../src/generate";
import { generate } from "./generate";
import { Command } from "commander";
import packageJson from "../package.json";

Expand Down
2 changes: 1 addition & 1 deletion src/generate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { generate as generateTSClients } from "openapi-typescript-codegen";
import { print } from "./print";
import { CLIOptions } from "../bin/cli";
import { CLIOptions } from "./cli";
import path from "path";
import { createSource } from "./createSource";

Expand Down
2 changes: 1 addition & 1 deletion src/print.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from "fs";
import path from "path";
import { CLIOptions } from "../bin/cli";
import { CLIOptions } from "./cli";

function printGeneratedTS(result: string, options: CLIOptions) {
const dir = path.join(options.outputDir, "queries")
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"lib": ["ESNext", "DOM"]
},
"include": [
"bin"
],
"src"
],
}

0 comments on commit 2351367

Please sign in to comment.