|
11 | 11 | "Sora Morimoto <[email protected]>" |
12 | 12 | ], |
13 | 13 | "type": "module", |
14 | | - "main": "./src/index.js", |
| 14 | + "exports": { |
| 15 | + ".": { |
| 16 | + "import": { |
| 17 | + "types": "./index.d.ts", |
| 18 | + "default": "./dist/lib.js" |
| 19 | + }, |
| 20 | + "require": { |
| 21 | + "types": "./index.d.ts", |
| 22 | + "default": "./dist/lib.cjs" |
| 23 | + } |
| 24 | + } |
| 25 | + }, |
| 26 | + "main": "./dist/lib.cjs", |
| 27 | + "module": "./dist/lib.js", |
15 | 28 | "types": "./index.d.ts", |
16 | 29 | "bin": { |
17 | | - "sta": "./index.js", |
18 | | - "swagger-typescript-api": "./index.js" |
| 30 | + "sta": "./dist/cli.js", |
| 31 | + "swagger-typescript-api": "./dist/cli.js" |
19 | 32 | }, |
20 | 33 | "files": [ |
21 | | - "cli", |
22 | | - "src", |
| 34 | + "dist", |
23 | 35 | "templates", |
24 | | - "index.d.ts", |
25 | | - "index.js" |
| 36 | + "index.d.ts" |
26 | 37 | ], |
27 | 38 | "scripts": { |
| 39 | + "build": "tsup", |
28 | 40 | "ci": "biome ci .", |
29 | 41 | "cli:help": "node index.js -h", |
30 | 42 | "cli:json": "node index.js -r -d -p ./swagger-test-cli.json -n swagger-test-cli.ts", |
31 | 43 | "cli:yaml": "node index.js -r -d -p ./swagger-test-cli.yaml -n swagger-test-cli.ts", |
32 | 44 | "format": "biome format --write .", |
33 | 45 | "format:check": "biome format .", |
34 | | - "test": "vitest run", |
35 | | - "validate": "node tests/validate.js", |
36 | | - "validate:debug": "node --nolazy tests/validate.js" |
| 46 | + "test": "vitest run" |
37 | 47 | }, |
38 | 48 | "dependencies": { |
39 | 49 | "@types/swagger-schema-official": "^2.0.25", |
|
60 | 70 | "@types/swagger2openapi": "7.0.4", |
61 | 71 | "axios": "1.7.2", |
62 | 72 | "shx": "0.3.4", |
| 73 | + "tsup": "8.1.0", |
63 | 74 | "vitest": "1.6.0" |
64 | 75 | }, |
65 | 76 | "packageManager": "[email protected]", |
|
0 commit comments