File tree Expand file tree Collapse file tree 4 files changed +12
-7
lines changed
Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -153,8 +153,8 @@ Create a `myPlugin.ts` file:
153153
154154``` ts
155155// 引用模块
156- // import { start } from 'https://deno.land/x/stc@2.13.0 /mod.ts'
157- import { start } from ' jsr:@lonu/stc@^2.13.0 '
156+ // import { start } from 'https://deno.land/x/stc@2.13.1 /mod.ts'
157+ import { start } from ' jsr:@lonu/stc@^2.13.1 '
158158
159159// Defining plugins
160160const myPlugin: IPlugin = {
Original file line number Diff line number Diff line change 11{
22 "name" : " @lonu/stc" ,
3- "version" : " 2.13.0 " ,
3+ "version" : " 2.13.1 " ,
44 "exports" : " ./mod.ts" ,
55 "tasks" : {
66 "pack" : " deno run -A src/pack.ts" ,
77 "dev" : " deno task pack && deno run -A --watch=src src/main.ts --url='https://petstore3.swagger.io/api/v3/openapi.json'" ,
88 "serve" : " deno run -A --watch=src src/service.ts" ,
9- "version" : " echo '2.13.0 ' > release/version" ,
9+ "version" : " echo '2.13.1 ' > release/version" ,
1010 "build:npm" : " deno run -A src/npm/build.ts" ,
1111 "build:mac" : " deno compile -A --target x86_64-apple-darwin --output release/stc src/main.ts" ,
1212 "build:mac-m" : " deno compile -A --target aarch64-apple-darwin --output release/stc-m src/main.ts" ,
Original file line number Diff line number Diff line change 22 * @example
33 * ```ts
44 * import { start } from "https://deno.land/x/stc@$X_VERSION/mod.ts";
5+ * // 导入解析方法
6+ * import { parserDefinition } from "npm:@lonu/stc/plugin/definition";
7+ * import { parserActions } from 'npm:@lonu/stc/plugin/action'
58 *
69 * const myPlugin: IPlugin = {
710 * name: "stc:MyPlugin",
8- * setup(options) {
9- * console.log(options)
11+ * setup(context) {
12+ * console.log(context);
13+ * // 类型映射
14+ * return {};
1015 * },
1116 * onTransform(def, action) {
1217 * // 转换 definition
Original file line number Diff line number Diff line change 11{
22 "name" : " @lonu/stc" ,
3- "version" : " 2.13.0 " ,
3+ "version" : " 2.13.1 " ,
44 "description" : " A tool for converting OpenApi/Swagger/Apifox into code." ,
55 "type" : " module" ,
66 "module" : " esm/mod.js" ,
You can’t perform that action at this time.
0 commit comments