From ad0c5367aafef5a7ebbcb94a9f15f71098991190 Mon Sep 17 00:00:00 2001 From: Badi Ifaoui Date: Sat, 28 Mar 2026 23:57:36 +0100 Subject: [PATCH 1/3] feat: update CLI package configuration and build process - Refactored the CLI package to use `tsup` for building, simplifying the build scripts. - Updated entry points and exports in `package.json` for better module resolution. - Added a new `tsup.config.ts` file to define build configurations. - Removed unnecessary ESM output settings and adjusted the main entry point. - Enhanced version management by dynamically importing the version from `package.json`. --- package.json | 1 + packages/cli/package.json | 19 ++-- packages/cli/src/cli.ts | 1 - packages/cli/src/index.ts | 13 +++ packages/cli/src/version.ts | 6 +- packages/cli/tsconfig.build.json | 6 +- packages/cli/tsup.config.ts | 22 ++++ pnpm-lock.yaml | 189 +++++++++++++++++++++++++++++++ 8 files changed, 242 insertions(+), 15 deletions(-) create mode 100644 packages/cli/src/index.ts create mode 100644 packages/cli/tsup.config.ts diff --git a/package.json b/package.json index 4ea104b..2a116bb 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "@changesets/cli": "^2.27.0", "@vitest/coverage-v8": "^3.2.4", "lint-staged": "^16.4.0", + "tsup": "^8.5.1", "typescript": "^5.7.0", "vitest": "^3.0.0" }, diff --git a/packages/cli/package.json b/packages/cli/package.json index 0042e56..1de7142 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -3,22 +3,24 @@ "version": "0.0.2", "type": "module", "bin": { - "reactive": "./dist/esm/cli.js" + "reactive": "./dist/cli.js", + "@growae/reactive-cli": "./dist/cli.js" }, - "main": "dist/esm/cli.js", - "types": "dist/types/cli.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "exports": { ".": { - "types": "./dist/types/cli.d.ts", - "default": "./dist/esm/cli.js" + "types": "./dist/index.d.ts", + "default": "./dist/index.js" }, "./package.json": "./package.json" }, + "files": ["dist"], "scripts": { - "build": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types", + "build": "tsup", "clean": "rm -rf dist", "check:types": "tsc --noEmit", - "dev": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types --watch" + "dev": "tsup --watch" }, "dependencies": { "@growae/reactive": "workspace:*", @@ -37,6 +39,7 @@ "access": "public" }, "devDependencies": { - "@types/node": "^25.5.0" + "@types/node": "^25.5.0", + "tsup": "^8.5.0" } } diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index fdb228a..62aa7af 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -1,4 +1,3 @@ -#!/usr/bin/env node import { cac } from 'cac' import { generate } from './commands/generate' diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts new file mode 100644 index 0000000..4ce5e8e --- /dev/null +++ b/packages/cli/src/index.ts @@ -0,0 +1,13 @@ +export { defineConfig } from './config' +export type { + ReactiveConfig, + ContractConfig, + Plugin, + ResolvedContract, +} from './config' + +export { aci } from './plugins/aci' +export type { AciConfig } from './plugins/aci' + +export { compiler } from './plugins/compiler' +export type { CompilerConfig } from './plugins/compiler' diff --git a/packages/cli/src/version.ts b/packages/cli/src/version.ts index 6af1fbc..c0eabc0 100644 --- a/packages/cli/src/version.ts +++ b/packages/cli/src/version.ts @@ -1 +1,5 @@ -export const version = '0.0.1' +import { createRequire } from 'node:module' + +const require = createRequire(import.meta.url) +const pkg = require('../package.json') as { version: string } +export const version = pkg.version diff --git a/packages/cli/tsconfig.build.json b/packages/cli/tsconfig.build.json index 9ff460e..a8af20f 100644 --- a/packages/cli/tsconfig.build.json +++ b/packages/cli/tsconfig.build.json @@ -2,11 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "src", - "outDir": "dist/esm", - "declarationDir": "dist/types", - "declaration": true, - "declarationMap": true, - "sourceMap": true, + "incremental": false, "paths": {} }, "include": ["src/**/*.ts"], diff --git a/packages/cli/tsup.config.ts b/packages/cli/tsup.config.ts new file mode 100644 index 0000000..1454c62 --- /dev/null +++ b/packages/cli/tsup.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from 'tsup' + +export default defineConfig([ + { + entry: { cli: 'src/cli.ts' }, + format: 'esm', + target: 'node18', + splitting: false, + clean: true, + banner: { js: '#!/usr/bin/env node' }, + tsconfig: 'tsconfig.build.json', + }, + { + entry: { index: 'src/index.ts' }, + format: 'esm', + target: 'node18', + dts: true, + splitting: false, + clean: false, + tsconfig: 'tsconfig.build.json', + }, +]) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f178e1b..7c4335c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: lint-staged: specifier: ^16.4.0 version: 16.4.0 + tsup: + specifier: ^8.5.1 + version: 8.5.1(jiti@2.6.1)(postcss@8.5.8)(typescript@5.9.3)(yaml@2.8.3) typescript: specifier: ^5.7.0 version: 5.9.3 @@ -45,6 +48,9 @@ importers: '@types/node': specifier: ^25.5.0 version: 25.5.0 + tsup: + specifier: ^8.5.0 + version: 8.5.1(jiti@2.6.1)(postcss@8.5.8)(typescript@5.9.3)(yaml@2.8.3) packages/connectors: dependencies: @@ -2909,6 +2915,9 @@ packages: resolution: {integrity: sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig==} engines: {node: '>=14'} + any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -3109,6 +3118,12 @@ packages: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} engines: {node: '>=18'} + bundle-require@5.1.0: + resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.18' + c12@3.3.3: resolution: {integrity: sha512-750hTRvgBy5kcMNPdh95Qo+XUBeGo8C7nsKSmedDmaQI+E0r82DwHeM6vBewDe4rGFbnxoa4V9pw+sPh5+Iz8Q==} peerDependencies: @@ -3239,6 +3254,10 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} @@ -3727,6 +3746,9 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} + fix-dts-default-cjs-exports@1.0.1: + resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==} + focus-trap@7.8.0: resolution: {integrity: sha512-/yNdlIkpWbM0ptxno3ONTuf+2g318kh2ez3KSeZN5dZ8YC6AAmgeWz+GasYYiBJPFaYcSAPeu4GfhUaChzIJXA==} @@ -4094,6 +4116,10 @@ packages: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true + joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + js-beautify@1.15.4: resolution: {integrity: sha512-9/KXeZUKKJwqCXUdBxFJ3vPh467OCckSBmYDwSK/EtV090K+iMJ7zx2S3HLVDIWFQdqMIsZWbnaGiba18aWhaA==} engines: {node: '>=14'} @@ -4174,6 +4200,9 @@ packages: resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} engines: {node: '>=14'} + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + lint-staged@16.4.0: resolution: {integrity: sha512-lBWt8hujh/Cjysw5GYVmZpFHXDCgZzhrOm8vbcUdobADZNOK/bRshr2kM3DfgrrtR1DQhfupW9gnIXOfiFi+bw==} engines: {node: '>=20.17'} @@ -4187,6 +4216,10 @@ packages: resolution: {integrity: sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==} engines: {node: '>=20.0.0'} + load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + local-pkg@1.1.2: resolution: {integrity: sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==} engines: {node: '>=14'} @@ -4373,6 +4406,9 @@ packages: muggle-string@0.4.1: resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} + mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + nanoid@3.3.11: resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -4487,6 +4523,10 @@ packages: engines: {node: '>=18'} hasBin: true + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + obug@2.1.1: resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} @@ -4646,6 +4686,10 @@ packages: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} + pirates@4.0.7: + resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} + engines: {node: '>= 6'} + pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} @@ -4702,6 +4746,24 @@ packages: peerDependencies: postcss: ^8.4.32 + postcss-load-config@6.0.1: + resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} + engines: {node: '>= 18'} + peerDependencies: + jiti: '>=1.21.0' + postcss: '>=8.0.9' + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + jiti: + optional: true + postcss: + optional: true + tsx: + optional: true + yaml: + optional: true + postcss-merge-longhand@7.0.5: resolution: {integrity: sha512-Kpu5v4Ys6QI59FxmxtNB/iHUVDn9Y9sYw66D6+SZoIk4QTz1prC4aYkhIESu+ieG1iylod1f8MILMs1Em3mmIw==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} @@ -5285,6 +5347,11 @@ packages: peerDependencies: postcss: ^8.4.32 + sucrase@3.35.1: + resolution: {integrity: sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + superjson@2.2.6: resolution: {integrity: sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==} engines: {node: '>=16'} @@ -5350,6 +5417,13 @@ packages: text-decoder@1.2.7: resolution: {integrity: sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==} + thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + + thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} @@ -5417,12 +5491,38 @@ packages: resolution: {integrity: sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==} engines: {node: '>=20'} + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsup@8.5.1: + resolution: {integrity: sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + '@microsoft/api-extractor': ^7.36.0 + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.5.0' + peerDependenciesMeta: + '@microsoft/api-extractor': + optional: true + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + tweetnacl-auth@1.0.1: resolution: {integrity: sha512-Qu2JonS5VUh5oJBnGsFohfel8O4gqN2QwdrsLjaZEZOU/25iIr3zU7jFOFbtOM5Wak5jiIViAqMvRvuxk9Lhmg==} @@ -8692,6 +8792,8 @@ snapshots: ansis@4.2.0: {} + any-promise@1.3.0: {} + anymatch@3.1.3: dependencies: normalize-path: 3.0.0 @@ -8891,6 +8993,11 @@ snapshots: dependencies: run-applescript: 7.1.0 + bundle-require@5.1.0(esbuild@0.27.4): + dependencies: + esbuild: 0.27.4 + load-tsconfig: 0.2.5 + c12@3.3.3(magicast@0.5.2): dependencies: chokidar: 5.0.0 @@ -9019,6 +9126,8 @@ snapshots: commander@2.20.3: {} + commander@4.1.1: {} + commondir@1.0.1: {} compatx@0.2.0: {} @@ -9535,6 +9644,12 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 + fix-dts-default-cjs-exports@1.0.1: + dependencies: + magic-string: 0.30.21 + mlly: 1.8.2 + rollup: 4.60.0 + focus-trap@7.8.0: dependencies: tabbable: 6.4.0 @@ -9909,6 +10024,8 @@ snapshots: jiti@2.6.1: {} + joycon@3.1.1: {} + js-beautify@1.15.4: dependencies: config-chain: 1.1.13 @@ -9993,6 +10110,8 @@ snapshots: lilconfig@3.1.3: {} + lines-and-columns@1.2.4: {} + lint-staged@16.4.0: dependencies: commander: 14.0.3 @@ -10032,6 +10151,8 @@ snapshots: rfdc: 1.4.1 wrap-ansi: 9.0.2 + load-tsconfig@0.2.5: {} + local-pkg@1.1.2: dependencies: mlly: 1.8.2 @@ -10213,6 +10334,12 @@ snapshots: muggle-string@0.4.1: {} + mz@2.7.0: + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + nanoid@3.3.11: {} nanotar@0.3.0: {} @@ -10515,6 +10642,8 @@ snapshots: pathe: 2.0.3 tinyexec: 1.0.4 + object-assign@4.1.1: {} + obug@2.1.1: {} ofetch@1.5.1: @@ -10717,6 +10846,8 @@ snapshots: pify@4.0.1: {} + pirates@4.0.7: {} + pkg-types@1.3.1: dependencies: confbox: 0.1.8 @@ -10770,6 +10901,14 @@ snapshots: dependencies: postcss: 8.5.8 + postcss-load-config@6.0.1(jiti@2.6.1)(postcss@8.5.8)(yaml@2.8.3): + dependencies: + lilconfig: 3.1.3 + optionalDependencies: + jiti: 2.6.1 + postcss: 8.5.8 + yaml: 2.8.3 + postcss-merge-longhand@7.0.5(postcss@8.5.8): dependencies: postcss: 8.5.8 @@ -11381,6 +11520,16 @@ snapshots: postcss: 8.5.8 postcss-selector-parser: 7.1.1 + sucrase@3.35.1: + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + commander: 4.1.1 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.7 + tinyglobby: 0.2.15 + ts-interface-checker: 0.1.13 + superjson@2.2.6: dependencies: copy-anything: 4.0.5 @@ -11460,6 +11609,14 @@ snapshots: transitivePeerDependencies: - react-native-b4a + thenify-all@1.6.0: + dependencies: + thenify: 3.3.1 + + thenify@3.3.1: + dependencies: + any-promise: 1.3.0 + tiny-invariant@1.3.3: {} tinybench@2.9.0: {} @@ -11511,10 +11668,42 @@ snapshots: dependencies: punycode: 2.3.1 + tree-kill@1.2.2: {} + trim-lines@3.0.1: {} + ts-interface-checker@0.1.13: {} + tslib@2.8.1: {} + tsup@8.5.1(jiti@2.6.1)(postcss@8.5.8)(typescript@5.9.3)(yaml@2.8.3): + dependencies: + bundle-require: 5.1.0(esbuild@0.27.4) + cac: 6.7.14 + chokidar: 4.0.3 + consola: 3.4.2 + debug: 4.4.3 + esbuild: 0.27.4 + fix-dts-default-cjs-exports: 1.0.1 + joycon: 3.1.1 + picocolors: 1.1.1 + postcss-load-config: 6.0.1(jiti@2.6.1)(postcss@8.5.8)(yaml@2.8.3) + resolve-from: 5.0.0 + rollup: 4.60.0 + source-map: 0.7.6 + sucrase: 3.35.1 + tinyexec: 0.3.2 + tinyglobby: 0.2.15 + tree-kill: 1.2.2 + optionalDependencies: + postcss: 8.5.8 + typescript: 5.9.3 + transitivePeerDependencies: + - jiti + - supports-color + - tsx + - yaml + tweetnacl-auth@1.0.1: dependencies: tweetnacl: 1.0.3 From a8056deab502144f5b17971c00799e90c53bc995 Mon Sep 17 00:00:00 2001 From: Badi Ifaoui Date: Sat, 28 Mar 2026 23:59:49 +0100 Subject: [PATCH 2/3] feat: add initial package structure and documentation for reactive ecosystem - Introduced new packages for CLI, connectors, core, and framework adapters (React, Vue, Solid). - Added LICENSE and README files for each package, detailing installation, usage, and documentation links. - Established a consistent structure across packages to enhance maintainability and usability. --- packages/cli/LICENSE | 21 +++++++ packages/cli/README.md | 70 ++++++++++++++++++++++ packages/connectors/LICENSE | 21 +++++++ packages/connectors/README.md | 64 ++++++++++++++++++++ packages/core/LICENSE | 21 +++++++ packages/core/README.md | 61 +++++++++++++++++++ packages/create-reactive/LICENSE | 21 +++++++ packages/create-reactive/README.md | 49 ++++++++++++++++ packages/react/LICENSE | 21 +++++++ packages/react/README.md | 92 +++++++++++++++++++++++++++++ packages/solid/LICENSE | 21 +++++++ packages/solid/README.md | 94 ++++++++++++++++++++++++++++++ packages/vue/LICENSE | 21 +++++++ packages/vue/README.md | 78 +++++++++++++++++++++++++ 14 files changed, 655 insertions(+) create mode 100644 packages/cli/LICENSE create mode 100644 packages/cli/README.md create mode 100644 packages/connectors/LICENSE create mode 100644 packages/connectors/README.md create mode 100644 packages/core/LICENSE create mode 100644 packages/core/README.md create mode 100644 packages/create-reactive/LICENSE create mode 100644 packages/create-reactive/README.md create mode 100644 packages/react/LICENSE create mode 100644 packages/react/README.md create mode 100644 packages/solid/LICENSE create mode 100644 packages/solid/README.md create mode 100644 packages/vue/LICENSE create mode 100644 packages/vue/README.md diff --git a/packages/cli/LICENSE b/packages/cli/LICENSE new file mode 100644 index 0000000..f85eafe --- /dev/null +++ b/packages/cli/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025-present Growae + +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/cli/README.md b/packages/cli/README.md new file mode 100644 index 0000000..54a1054 --- /dev/null +++ b/packages/cli/README.md @@ -0,0 +1,70 @@ +

@growae/reactive-cli

+ +

+ CLI for generating typed Sophia contract bindings from ACI +

+ +

+ Version + Downloads + MIT License +

+ +
+ +## Overview + +CLI for `@growae/reactive` that generates fully typed TypeScript code from Sophia contract ACI files. Supports watch mode for development. Also exports `defineConfig`, `aci()` plugin, and `compiler()` plugin for programmatic use. + +## Install + +```bash +# npm +npm install -D @growae/reactive-cli + +# yarn +yarn add -D @growae/reactive-cli + +# pnpm +pnpm add -D @growae/reactive-cli +``` + +## Usage + +### Scaffold a config + +```bash +npx @growae/reactive-cli init +``` + +### Generate typed bindings + +```bash +npx @growae/reactive-cli generate +``` + +### Watch mode + +```bash +npx @growae/reactive-cli generate --watch +``` + +### Config file + +```ts +// reactive.config.ts +import { defineConfig } from '@growae/reactive-cli' + +export default defineConfig({ + out: 'src/generated.ts', + contracts: [{ name: 'Token', aci: './contracts/Token.json' }], +}) +``` + +## Documentation + +Visit [reactive.growae.io/cli/getting-started](https://reactive.growae.io/cli/getting-started) for the full documentation. + +## License + +[MIT](https://github.com/growae/reactive/blob/main/LICENSE) diff --git a/packages/connectors/LICENSE b/packages/connectors/LICENSE new file mode 100644 index 0000000..f85eafe --- /dev/null +++ b/packages/connectors/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025-present Growae + +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/connectors/README.md b/packages/connectors/README.md new file mode 100644 index 0000000..336484e --- /dev/null +++ b/packages/connectors/README.md @@ -0,0 +1,64 @@ +

@growae/reactive-connectors

+ +

+ Wallet connectors for Aeternity +

+ +

+ Version + Downloads + MIT License +

+ +
+ +## Overview + +Wallet connectors for `@growae/reactive`. Includes `superhero()` (Superhero Wallet), `iframe()`, `webExtension()`, `ledger()`, `metamaskSnap()`, and `walletDetect()`, plus re-exports `mock()` and `memory()` from core. + +## Install + +```bash +# npm +npm install @growae/reactive-connectors @growae/reactive + +# yarn +yarn add @growae/reactive-connectors @growae/reactive + +# pnpm +pnpm add @growae/reactive-connectors @growae/reactive +``` + +## Usage + +```ts +import { createConfig } from '@growae/reactive' +import { testnet } from '@growae/reactive/networks' +import { + superhero, + ledger, + walletDetect, +} from '@growae/reactive-connectors' + +const config = createConfig({ + networks: [testnet], + connectors: [ + superhero(), + ledger(), + walletDetect(), + ], +}) +``` + +## Peer Dependencies + +- `@aeternity/aepp-sdk >=14` +- Optional: `@ledgerhq/hw-transport >=6` + +## Documentation + +Visit [reactive.growae.io/core/getting-started](https://reactive.growae.io/core/getting-started) for the full documentation. + +## License + +[MIT](https://github.com/growae/reactive/blob/main/LICENSE) diff --git a/packages/core/LICENSE b/packages/core/LICENSE new file mode 100644 index 0000000..f85eafe --- /dev/null +++ b/packages/core/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025-present Growae + +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/core/README.md b/packages/core/README.md new file mode 100644 index 0000000..0005bcd --- /dev/null +++ b/packages/core/README.md @@ -0,0 +1,61 @@ +

@growae/reactive

+ +

+ Core vanilla TypeScript toolkit for Aeternity blockchain interactions +

+ +

+ Version + Downloads + MIT License +

+ +
+ +## Overview + +Config-driven setup for Aeternity dApps. Provides actions (`spend`, `getBalance`, `signMessage`, `deployContract`, and more), network management, and a connector system. Use standalone or pair with a framework adapter. + +## Install + +```bash +# npm +npm install @growae/reactive + +# yarn +yarn add @growae/reactive + +# pnpm +pnpm add @growae/reactive +``` + +## Usage + +```ts +import { createConfig } from '@growae/reactive' +import { getBalance, spend } from '@growae/reactive/actions' +import { testnet } from '@growae/reactive/networks' + +const config = createConfig({ networks: [testnet] }) + +const balance = await getBalance(config, { address: 'ak_...' }) + +await spend(config, { + recipient: 'ak_...', + amount: '1.0', +}) +``` + +## Dependencies + +- [`@aeternity/aepp-sdk`](https://www.npmjs.com/package/@aeternity/aepp-sdk) +- [`zustand`](https://www.npmjs.com/package/zustand) +- Optional peer: [`@tanstack/query-core`](https://www.npmjs.com/package/@tanstack/query-core) + +## Documentation + +Visit [reactive.growae.io/core/getting-started](https://reactive.growae.io/core/getting-started) for the full documentation. + +## License + +[MIT](https://github.com/growae/reactive/blob/main/LICENSE) diff --git a/packages/create-reactive/LICENSE b/packages/create-reactive/LICENSE new file mode 100644 index 0000000..f85eafe --- /dev/null +++ b/packages/create-reactive/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025-present Growae + +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/create-reactive/README.md b/packages/create-reactive/README.md new file mode 100644 index 0000000..0a61882 --- /dev/null +++ b/packages/create-reactive/README.md @@ -0,0 +1,49 @@ +

@growae/create-reactive

+ +

+ Scaffold a new Aeternity dApp project +

+ +

+ Version + Downloads + MIT License +

+ +
+ +## Overview + +Interactive project scaffolder for `@growae/reactive`. Creates a ready-to-run Aeternity dApp with your choice of framework and tooling. + +## Usage + +```bash +# npm +npm create @growae/reactive + +# yarn +yarn create @growae/reactive + +# pnpm +pnpm create @growae/reactive +``` + +## Templates + +| Template | Description | +|---|---| +| `vite-react` | React + Vite | +| `vite-vue` | Vue + Vite | +| `vite-solid` | Solid.js + Vite | +| `vite-vanilla` | Vanilla TypeScript + Vite | +| `next` | Next.js | +| `nuxt` | Nuxt | + +## Documentation + +Visit [reactive.growae.io](https://reactive.growae.io) for the full documentation. + +## License + +[MIT](https://github.com/growae/reactive/blob/main/LICENSE) diff --git a/packages/react/LICENSE b/packages/react/LICENSE new file mode 100644 index 0000000..f85eafe --- /dev/null +++ b/packages/react/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025-present Growae + +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/react/README.md b/packages/react/README.md new file mode 100644 index 0000000..c9e5b86 --- /dev/null +++ b/packages/react/README.md @@ -0,0 +1,92 @@ +

@growae/reactive-react

+ +

+ React hooks for building Aeternity dApps +

+ +

+ Version + Downloads + MIT License +

+ +
+ +## Overview + +React adapter for `@growae/reactive`. Built on TanStack React Query, it provides `ReactiveProvider` and hooks like `useConnect`, `useBalance`, `useSpend`, `useReadContract`, and more. + +## Install + +```bash +# npm +npm install @growae/reactive-react @growae/reactive @tanstack/react-query + +# yarn +yarn add @growae/reactive-react @growae/reactive @tanstack/react-query + +# pnpm +pnpm add @growae/reactive-react @growae/reactive @tanstack/react-query +``` + +## Usage + +```tsx +import { createConfig } from '@growae/reactive' +import { testnet } from '@growae/reactive/networks' +import { superhero } from '@growae/reactive-connectors' +import { ReactiveProvider } from '@growae/reactive-react' +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' + +const config = createConfig({ + networks: [testnet], + connectors: [superhero()], +}) + +const queryClient = new QueryClient() + +function App() { + return ( + + + + + + ) +} +``` + +```tsx +import { useConnect, useBalance, useSpend } from '@growae/reactive-react' + +function Wallet() { + const { connect, connectors } = useConnect() + const { data: balance } = useBalance({ address: 'ak_...' }) + const { mutate: send } = useSpend() + + return ( +
+ + {balance &&

Balance: {balance.ae} AE

} + +
+ ) +} +``` + +## Peer Dependencies + +- `react >=18` +- `@tanstack/react-query >=5` + +## Documentation + +Visit [reactive.growae.io/react/getting-started](https://reactive.growae.io/react/getting-started) for the full documentation. + +## License + +[MIT](https://github.com/growae/reactive/blob/main/LICENSE) diff --git a/packages/solid/LICENSE b/packages/solid/LICENSE new file mode 100644 index 0000000..f85eafe --- /dev/null +++ b/packages/solid/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025-present Growae + +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/solid/README.md b/packages/solid/README.md new file mode 100644 index 0000000..473e30c --- /dev/null +++ b/packages/solid/README.md @@ -0,0 +1,94 @@ +

@growae/reactive-solid

+ +

+ Solid.js primitives for building Aeternity dApps +

+ +

+ Version + Downloads + MIT License +

+ +
+ +## Overview + +Solid.js adapter for `@growae/reactive`. Built on TanStack Solid Query, it provides `ReactiveProvider` and primitives like `useConnect`, `useBalance`, `useSpend`, `useReadContract`, and more. + +## Install + +```bash +# npm +npm install @growae/reactive-solid @growae/reactive @tanstack/solid-query + +# yarn +yarn add @growae/reactive-solid @growae/reactive @tanstack/solid-query + +# pnpm +pnpm add @growae/reactive-solid @growae/reactive @tanstack/solid-query +``` + +## Usage + +```tsx +import { createConfig } from '@growae/reactive' +import { testnet } from '@growae/reactive/networks' +import { superhero } from '@growae/reactive-connectors' +import { ReactiveProvider } from '@growae/reactive-solid' +import { QueryClient, QueryClientProvider } from '@tanstack/solid-query' + +const config = createConfig({ + networks: [testnet], + connectors: [superhero()], +}) + +const queryClient = new QueryClient() + +function App() { + return ( + + + + + + ) +} +``` + +```tsx +import { useConnect, useBalance, useSpend } from '@growae/reactive-solid' + +function Wallet() { + const connect = useConnect() + const balance = useBalance({ address: 'ak_...' }) + const spend = useSpend() + + return ( +
+ + +

Balance: {balance.data.ae} AE

+
+ +
+ ) +} +``` + +## Peer Dependencies + +- `solid-js >=1` +- `@tanstack/solid-query >=5` + +## Documentation + +Visit [reactive.growae.io/solid/getting-started](https://reactive.growae.io/solid/getting-started) for the full documentation. + +## License + +[MIT](https://github.com/growae/reactive/blob/main/LICENSE) diff --git a/packages/vue/LICENSE b/packages/vue/LICENSE new file mode 100644 index 0000000..f85eafe --- /dev/null +++ b/packages/vue/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025-present Growae + +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/vue/README.md b/packages/vue/README.md new file mode 100644 index 0000000..af13f2c --- /dev/null +++ b/packages/vue/README.md @@ -0,0 +1,78 @@ +

@growae/reactive-vue

+ +

+ Vue composables for building Aeternity dApps +

+ +

+ Version + Downloads + MIT License +

+ +
+ +## Overview + +Vue adapter for `@growae/reactive`. Built on TanStack Vue Query, it provides a `ReactivePlugin` for Vue, composables like `useConnect`, `useBalance`, `useSpend`, and a Nuxt module at `@growae/reactive-vue/nuxt`. + +## Install + +```bash +# npm +npm install @growae/reactive-vue @growae/reactive @tanstack/vue-query + +# yarn +yarn add @growae/reactive-vue @growae/reactive @tanstack/vue-query + +# pnpm +pnpm add @growae/reactive-vue @growae/reactive @tanstack/vue-query +``` + +## Usage + +```ts +import { createApp } from 'vue' +import { createConfig } from '@growae/reactive' +import { testnet } from '@growae/reactive/networks' +import { ReactivePlugin } from '@growae/reactive-vue' +import { VueQueryPlugin } from '@tanstack/vue-query' + +const config = createConfig({ networks: [testnet] }) + +const app = createApp(App) +app.use(VueQueryPlugin) +app.use(ReactivePlugin, { config }) +app.mount('#app') +``` + +```ts +import { useConnect, useBalance, useSpend } from '@growae/reactive-vue' + +const { connect, connectors } = useConnect() +const { data: balance } = useBalance({ address: 'ak_...' }) +const { mutate: send } = useSpend() +``` + +### Nuxt + +```ts +// nuxt.config.ts +export default defineNuxtConfig({ + modules: ['@growae/reactive-vue/nuxt'], +}) +``` + +## Peer Dependencies + +- `vue >=3` +- `@tanstack/vue-query >=5` +- Optional: `nuxt >=3` + +## Documentation + +Visit [reactive.growae.io/vue/getting-started](https://reactive.growae.io/vue/getting-started) for the full documentation. + +## License + +[MIT](https://github.com/growae/reactive/blob/main/LICENSE) From 8a5114ff168bd4168531b29286680de656a120cd Mon Sep 17 00:00:00 2001 From: Badi Ifaoui Date: Sun, 29 Mar 2026 00:01:29 +0100 Subject: [PATCH 3/3] feat: update installation instructions across documentation - Enhanced the installation sections in various documentation files to include code-group formatting for npm, yarn, and pnpm commands. - Updated the getting started guides for CLI, core, React, Solid, and Vue to improve clarity and usability for users. --- site/cli/getting-started.md | 14 +++++++++++++- site/cli/installation.md | 14 +++++++++++++- site/core/getting-started.md | 14 +++++++++++++- site/react/getting-started.md | 14 +++++++++++++- site/solid/getting-started.md | 14 +++++++++++++- site/vue/getting-started.md | 14 +++++++++++++- 6 files changed, 78 insertions(+), 6 deletions(-) diff --git a/site/cli/getting-started.md b/site/cli/getting-started.md index 9817f7f..7ecb12f 100644 --- a/site/cli/getting-started.md +++ b/site/cli/getting-started.md @@ -8,10 +8,22 @@ ### 1. Install -```bash +::: code-group + +```bash [npm] +npm install -D @growae/reactive-cli +``` + +```bash [yarn] +yarn add -D @growae/reactive-cli +``` + +```bash [pnpm] pnpm add -D @growae/reactive-cli ``` +::: + ### 2. Initialize Config ```bash diff --git a/site/cli/installation.md b/site/cli/installation.md index 339e52b..8c331de 100644 --- a/site/cli/installation.md +++ b/site/cli/installation.md @@ -27,10 +27,22 @@ yarn add -D @growae/reactive-cli You can also install globally: -```bash +::: code-group + +```bash [npm] +npm install -g @growae/reactive-cli +``` + +```bash [yarn] +yarn global add @growae/reactive-cli +``` + +```bash [pnpm] pnpm add -g @growae/reactive-cli ``` +::: + Then use without `npx`: ```bash diff --git a/site/core/getting-started.md b/site/core/getting-started.md index 31adddf..6d78ee0 100644 --- a/site/core/getting-started.md +++ b/site/core/getting-started.md @@ -8,10 +8,22 @@ ### 1. Install -```bash +::: code-group + +```bash [npm] +npm install @growae/reactive +``` + +```bash [yarn] +yarn add @growae/reactive +``` + +```bash [pnpm] pnpm add @growae/reactive ``` +::: + ### 2. Create a Config ```typescript diff --git a/site/react/getting-started.md b/site/react/getting-started.md index 2e2f75f..2b00e63 100644 --- a/site/react/getting-started.md +++ b/site/react/getting-started.md @@ -8,10 +8,22 @@ ### 1. Install -```bash +::: code-group + +```bash [npm] +npm install @growae/reactive-react @tanstack/react-query +``` + +```bash [yarn] +yarn add @growae/reactive-react @tanstack/react-query +``` + +```bash [pnpm] pnpm add @growae/reactive-react @tanstack/react-query ``` +::: + ### 2. Set Up Providers ```tsx diff --git a/site/solid/getting-started.md b/site/solid/getting-started.md index 5855044..3f38876 100644 --- a/site/solid/getting-started.md +++ b/site/solid/getting-started.md @@ -8,10 +8,22 @@ ### 1. Install -```bash +::: code-group + +```bash [npm] +npm install @growae/reactive-solid @tanstack/solid-query +``` + +```bash [yarn] +yarn add @growae/reactive-solid @tanstack/solid-query +``` + +```bash [pnpm] pnpm add @growae/reactive-solid @tanstack/solid-query ``` +::: + ### 2. Set Up Provider ```tsx diff --git a/site/vue/getting-started.md b/site/vue/getting-started.md index 20f0015..9d76c08 100644 --- a/site/vue/getting-started.md +++ b/site/vue/getting-started.md @@ -8,10 +8,22 @@ ### 1. Install -```bash +::: code-group + +```bash [npm] +npm install @growae/reactive-vue @tanstack/vue-query +``` + +```bash [yarn] +yarn add @growae/reactive-vue @tanstack/vue-query +``` + +```bash [pnpm] pnpm add @growae/reactive-vue @tanstack/vue-query ``` +::: + ### 2. Set Up Plugin ```typescript