From 164450b0333cdd0f370f8ee9ad2487438f2a1e17 Mon Sep 17 00:00:00 2001 From: Daniel Izdebski Date: Wed, 4 Oct 2023 14:20:17 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=EF=B8=8F=20feat(wallets):=20Initia?= =?UTF-8?q?lize=20`metamask`=20wallet=20package?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 15 +++++++++++++++ wallets/metamask/package.json | 32 ++++++++++++++++++++++++++++++++ wallets/metamask/src/index.ts | 3 +++ wallets/metamask/tsconfig.json | 13 +++++++++++++ wallets/metamask/tsup.config.ts | 10 ++++++++++ 5 files changed, 73 insertions(+) create mode 100644 wallets/metamask/package.json create mode 100644 wallets/metamask/src/index.ts create mode 100644 wallets/metamask/tsconfig.json create mode 100644 wallets/metamask/tsup.config.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a165306e6..cfb7249cb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,6 +123,21 @@ importers: packages/tsconfig: {} + wallets/metamask: + devDependencies: + rimraf: + specifier: ^5.0.1 + version: 5.0.1 + tsconfig: + specifier: workspace:* + version: link:../../packages/tsconfig + tsup: + specifier: ^7.2.0 + version: 7.2.0(typescript@5.2.2) + typescript: + specifier: ^5.2.2 + version: 5.2.2 + wallets/metamask-legacy: dependencies: '@playwright/test': diff --git a/wallets/metamask/package.json b/wallets/metamask/package.json new file mode 100644 index 000000000..c7f77636c --- /dev/null +++ b/wallets/metamask/package.json @@ -0,0 +1,32 @@ +{ + "name": "metamask", + "version": "1.0.0", + "type": "module", + "exports": { + ".": { + "import": { + "types": "./types/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "main": "./dist/index.js", + "files": [ + "dist", + "src", + "types" + ], + "scripts": { + "build": "pnpm run clean && pnpm run build:dist && pnpm run build:types", + "build:dist": "tsup", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf dist types", + "types:check": "tsc --noEmit" + }, + "devDependencies": { + "rimraf": "^5.0.1", + "tsconfig": "workspace:*", + "tsup": "^7.2.0", + "typescript": "^5.2.2" + } +} diff --git a/wallets/metamask/src/index.ts b/wallets/metamask/src/index.ts new file mode 100644 index 000000000..a23a9afef --- /dev/null +++ b/wallets/metamask/src/index.ts @@ -0,0 +1,3 @@ +export function hello() { + return 'Hello World!' +} diff --git a/wallets/metamask/tsconfig.json b/wallets/metamask/tsconfig.json new file mode 100644 index 000000000..8d8c8bf96 --- /dev/null +++ b/wallets/metamask/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "tsconfig/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "types", + "declaration": true, + "sourceMap": true, + "declarationMap": true + }, + "include": [ + "src" + ] +} diff --git a/wallets/metamask/tsup.config.ts b/wallets/metamask/tsup.config.ts new file mode 100644 index 000000000..6c1b54996 --- /dev/null +++ b/wallets/metamask/tsup.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'tsup' + +export default defineConfig({ + name: 'metamask', + entry: ['src/index.ts'], + outDir: 'dist', + format: 'esm', + splitting: false, + sourcemap: true +})