From 3df5f17a90f9a10d06c725b989f15df7eff6570c Mon Sep 17 00:00:00 2001 From: streakingman Date: Thu, 16 Mar 2023 10:08:13 +0800 Subject: [PATCH 1/3] docs: update install add usage section --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b9154d0..6c89f0b 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,12 @@ OpenAPI Specification ➡️ TypeScript npm i -D oas-gen-ts ``` +or + +```shell +yarn add --dev oas-gen-ts +``` + # Usage ## CLI @@ -16,7 +22,8 @@ Create oas.config.js or oas.json in the root directory of the project, and refer The search order for configuration files is `oas.config.cjs`, `oas.config.js`, `oas.json`. -```ts +```javascript +const { defineConfig } = require('oas-gen-ts'); // oas.config.cjs export default defineConfig({ axiosImport: `import { axios } from '@/util/axios';`, From 2d9277b735a937dd420375846c93977d89106c41 Mon Sep 17 00:00:00 2001 From: streakingman Date: Thu, 16 Mar 2023 10:12:38 +0800 Subject: [PATCH 2/3] docs: update usage section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c89f0b..1ac6980 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ The search order for configuration files is `oas.config.cjs`, `oas.config.js`, ` ```javascript const { defineConfig } = require('oas-gen-ts'); // oas.config.cjs -export default defineConfig({ +module.exports = defineConfig({ axiosImport: `import { axios } from '@/util/axios';`, list: [ { From 26e316ba9bb356ecae96bcb63782e646dc63bb3c Mon Sep 17 00:00:00 2001 From: streakingman Date: Thu, 16 Mar 2023 10:13:00 +0800 Subject: [PATCH 3/3] docs: update usage section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ac6980..557e6e2 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ Create oas.config.js or oas.json in the root directory of the project, and refer The search order for configuration files is `oas.config.cjs`, `oas.config.js`, `oas.json`. ```javascript -const { defineConfig } = require('oas-gen-ts'); // oas.config.cjs +const { defineConfig } = require('oas-gen-ts'); module.exports = defineConfig({ axiosImport: `import { axios } from '@/util/axios';`, list: [