From cf30f5876269b456b85ddbb1388da8a1df308176 Mon Sep 17 00:00:00 2001 From: Zhichao Zhang Date: Thu, 20 May 2021 15:16:50 +0800 Subject: [PATCH] feat: typegen plugin define redspot user config --- packages/redspot-typegen/LICENSE | 21 +++++++++++++++++++ packages/redspot-typegen/README.md | 1 + packages/redspot-typegen/package.json | 10 +++++++++ packages/redspot-typegen/src/index.ts | 0 .../redspot-typegen/src/type-extensions.ts | 9 ++++++++ tsconfig.json | 6 ++++++ 6 files changed, 47 insertions(+) create mode 100644 packages/redspot-typegen/LICENSE create mode 100644 packages/redspot-typegen/README.md create mode 100644 packages/redspot-typegen/package.json create mode 100644 packages/redspot-typegen/src/index.ts create mode 100644 packages/redspot-typegen/src/type-extensions.ts diff --git a/packages/redspot-typegen/LICENSE b/packages/redspot-typegen/LICENSE new file mode 100644 index 00000000..809fdcb1 --- /dev/null +++ b/packages/redspot-typegen/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2020 Patract Labs LLC + +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. diff --git a/packages/redspot-typegen/README.md b/packages/redspot-typegen/README.md new file mode 100644 index 00000000..e62620b5 --- /dev/null +++ b/packages/redspot-typegen/README.md @@ -0,0 +1 @@ +# @redspot/typegen diff --git a/packages/redspot-typegen/package.json b/packages/redspot-typegen/package.json new file mode 100644 index 00000000..d82a4e65 --- /dev/null +++ b/packages/redspot-typegen/package.json @@ -0,0 +1,10 @@ +{ + "name": "@redspot/typegen", + "version": "0.11.4-25", + "author": "Patract Labs", + "main": "index.js", + "license": "MIT", + "dependencies": { + "redspot": "^0.11.4-25" + } +} diff --git a/packages/redspot-typegen/src/index.ts b/packages/redspot-typegen/src/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/redspot-typegen/src/type-extensions.ts b/packages/redspot-typegen/src/type-extensions.ts new file mode 100644 index 00000000..7db15a02 --- /dev/null +++ b/packages/redspot-typegen/src/type-extensions.ts @@ -0,0 +1,9 @@ +import 'redspot/types/config'; + +declare module 'redspot/types/config' { + interface HardhatUserConfig { + typegen: { + outDir: string; + }; + } +} diff --git a/tsconfig.json b/tsconfig.json index 8b721376..ed956b2e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -67,6 +67,12 @@ ], "@redspot/decimals/*": [ "packages/redspot-decimals/src/*" + ], + "@redspot/typegen": [ + "packages/redspot-typegen/src" + ], + "@redspot/typegen/*": [ + "packages/redspot-typegen/src/*" ] }, "skipLibCheck": true,