diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index fc067cf..673b91a 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -18,6 +18,6 @@ jobs: registry-url: https://registry.npmjs.org/ - run: yarn install - run: yarn ci - - run: npm publish --tag beta + - run: npm publish --access=public env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a75a7f4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 17cb7c6..5668597 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# typescript-to-jsonschema +# fast-typescript-to-jsonschema - ![Test](https://github.com/yunke-yunfly/typescript-to-jsonschema/workflows/Test/badge.svg) + ![Test](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/workflows/Test/badge.svg) 生成typescript类型的jsonschema数据 @@ -14,7 +14,7 @@ - 1.安装依赖 ```js -yarn add typescript-to-jsonschema -D +yarn add fast-typescript-to-jsonschema -D ``` - 2.创建`type.ts`文件,内容如下: @@ -30,7 +30,7 @@ interface ITest { - 3.创建`test.js`文件,内容如下: ```js -const { default: genTypeSchema } = require('typescript-to-jsonschema'); +const { default: genTypeSchema } = require('fast-typescript-to-jsonschema'); const path = require('path'); // 目标文件 @@ -80,7 +80,7 @@ node ./test.js ``` - example 案例地址: -https://github.com/wangweianger/typescript-to-jsonschema/tree/master/example +https://github.com/wangweianger/fast-typescript-to-jsonschema/tree/master/example ## 注释 @@ -199,6 +199,6 @@ interface Interface_4 { 我们非常欢迎您的贡献,您可以通过以下方式与我们共建。 -- 提交[GitHub 问题](https://github.com/yunke-yunfly/typescript-to-jsonschema/issues)以报告错误或提出问题。 -- 提出[拉取请求](https://github.com/yunke-yunfly/typescript-to-jsonschema/pulls)以改进我们的代码。 +- 提交[GitHub 问题](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/issues)以报告错误或提出问题。 +- 提出[拉取请求](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/pulls)以改进我们的代码。 - [贡献指南](CONTRIBUTING.md)。 diff --git a/package.json b/package.json index f541219..66a7ef8 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,18 @@ { - "name": "typescript-to-jsonschema", - "version": "0.0.1-beta.2", + "name": "fast-fast-typescript-to-jsonschema", + "version": "0.0.1", + "description": "fast-typescript-to-jsonschema generates JSON Schema files from your Typescript sources.", "main": "./dist/index.js", "typings": "dist/index.d.ts", - "repository": "https://github.com/yunke-yunfly/typescript-to-jsonschema", + "repository": "https://github.com/yunke-yunfly/fast-typescript-to-jsonschema", "author": "zane ", "license": "MIT", + "keywords": [ + "typescript", + "json", + "jsonschema", + "schema" + ], "scripts": { "build": "gts clean && tsc", "dev": "tsc --watch",