diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml index 388e522ea9..b85e1af6d4 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/on-pull-request.yml @@ -86,10 +86,10 @@ jobs: - name: Setup Node uses: ./.github/actions/setup-node - - name: Build + - name: Build Libraries env: API_KEY: ${{ secrets.API_KEY }} - run: yarn build:dev + run: yarn build:libs - name: Unit Test run: yarn test:ci diff --git a/aa-sdk/core/package.json b/aa-sdk/core/package.json index cda3a2837b..fe44910fb6 100644 --- a/aa-sdk/core/package.json +++ b/aa-sdk/core/package.json @@ -36,7 +36,7 @@ "build": "yarn clean && yarn build:esm && yarn build:types", "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "docs:gen": "npx ak-docgen generate --in ./src/index.ts --out ../../site/pages/reference/aa-sdk/core", + "docs:gen": "node ../../doc-gen/dist/esm/cli.js generate --in ./src/index.ts --out ../../site/pages/reference/aa-sdk/core", "clean": "rm -rf ./dist", "test": "vitest", "test:run": "vitest run" diff --git a/aa-sdk/ethers/package.json b/aa-sdk/ethers/package.json index 2c7870f101..42d587e3b2 100644 --- a/aa-sdk/ethers/package.json +++ b/aa-sdk/ethers/package.json @@ -35,7 +35,7 @@ "build": "yarn clean && yarn build:esm && yarn build:types", "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "docs:gen": "npx ak-docgen generate --in ./src/index.ts --out ../../site/pages/reference/aa-sdk/ethers", + "docs:gen": "node ../../doc-gen/dist/esm/cli.js generate --in ./src/index.ts --out ../../site/pages/reference/aa-sdk/ethers", "clean": "rm -rf ./dist", "test": "vitest", "test:run": "vitest run" diff --git a/account-kit/core/package.json b/account-kit/core/package.json index f02684d1a0..209c90ccc3 100644 --- a/account-kit/core/package.json +++ b/account-kit/core/package.json @@ -34,12 +34,13 @@ "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", "clean": "rm -rf ./dist", - "docs:gen": "npx ak-docgen generate --in ./src/index.ts --out ../../site/pages/reference/account-kit/core", + "docs:gen": "node ../../doc-gen/dist/esm/cli.js generate --in ./src/index.ts --out ../../site/pages/reference/account-kit/core", "test": "vitest --passWithNoTests", "test:run": "vitest run --passWithNoTests" }, "devDependencies": { "@types/js-cookie": "^3.0.6", + "ak-docgen": "*", "typescript": "^5.0.4", "typescript-template": "*", "vitest": "^2.0.4" diff --git a/account-kit/infra/package.json b/account-kit/infra/package.json index cf882788c6..54cb572d7f 100644 --- a/account-kit/infra/package.json +++ b/account-kit/infra/package.json @@ -33,12 +33,13 @@ "build": "yarn clean && yarn build:esm && yarn build:types", "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "docs:gen": "npx ak-docgen generate --in ./src/index.ts --out ../../site/pages/reference/account-kit/infra", + "docs:gen": "node ../../doc-gen/dist/esm/cli.js generate --in ./src/index.ts --out ../../site/pages/reference/account-kit/infra", "clean": "rm -rf ./dist", "test": "vitest", "test:run": "vitest run" }, "devDependencies": { + "ak-docgen": "*", "typescript": "^5.0.4", "typescript-template": "*", "vitest": "^2.0.4" diff --git a/account-kit/react/package.json b/account-kit/react/package.json index 6e8ded9fd8..84167d158a 100644 --- a/account-kit/react/package.json +++ b/account-kit/react/package.json @@ -41,7 +41,7 @@ "build:dev": "lerna watch --scope='@account-kit/react' --include-dependencies -- lerna run build --scope=@account-kit/react", "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "docs:gen": "npx ak-docgen generate --in ./src/index.ts --out ../../site/pages/reference/account-kit/react", + "docs:gen": "node ../../doc-gen/dist/esm/cli.js generate --in ./src/index.ts --out ../../site/pages/reference/account-kit/react", "clean": "rm -rf ./dist", "test": "vitest --passWithNoTests", "test:run": "vitest run --passWithNoTests" @@ -55,6 +55,7 @@ "@storybook/test-runner": "^0.13.0", "@storybook/testing-library": "^0.2.2", "@tanstack/react-query": "^5.28.9", + "ak-docgen": "*", "autoprefixer": "^10.4.20", "msw": "^2.4.4", "msw-storybook-addon": "^2.0.3", diff --git a/account-kit/signer/package.json b/account-kit/signer/package.json index c82a3edf30..b131d7056a 100644 --- a/account-kit/signer/package.json +++ b/account-kit/signer/package.json @@ -33,7 +33,7 @@ "build": "yarn clean && yarn build:esm && yarn build:types", "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "docs:gen": "npx ak-docgen generate --in ./src/index.ts --out ../../site/pages/reference/account-kit/signer", + "docs:gen": "node ../../doc-gen/dist/esm/cli.js generate --in ./src/index.ts --out ../../site/pages/reference/account-kit/signer", "clean": "rm -rf ./dist", "test": "vitest --passWithNoTests", "test:run": "vitest run --passWithNoTests" @@ -54,6 +54,7 @@ "@turnkey/iframe-stamper": "^1.0.0", "@turnkey/viem": "^0.4.8", "@turnkey/webauthn-stamper": "^0.4.3", + "ak-docgen": "*", "jwt-decode": "^4.0.0", "zod": "^3.22.4" }, diff --git a/account-kit/smart-contracts/package.json b/account-kit/smart-contracts/package.json index 24ef0960d2..bd1ac3f128 100644 --- a/account-kit/smart-contracts/package.json +++ b/account-kit/smart-contracts/package.json @@ -39,13 +39,14 @@ "build": "yarn clean && yarn build:esm && yarn build:types", "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "docs:gen": "npx ak-docgen generate --in ./src/index.ts --out ../../site/pages/reference/account-kit/smart-contracts", + "docs:gen": "node ../../doc-gen/dist/esm/cli.js generate --in ./src/index.ts --out ../../site/pages/reference/account-kit/smart-contracts", "clean": "rm -rf ./dist", "test": "vitest", "test:run": "vitest run" }, "devDependencies": { "@account-kit/plugingen": "^4.3.1", + "ak-docgen": "*", "change-case": "^5.1.2", "dedent": "^1.5.1", "dotenv": "^16.3.1", diff --git a/examples/ui-demo/vercel.json b/examples/ui-demo/vercel.json new file mode 100644 index 0000000000..f1962d9d10 --- /dev/null +++ b/examples/ui-demo/vercel.json @@ -0,0 +1,3 @@ +{ + "buildCommand": "cd ../.. && yarn build:demo" +} diff --git a/package.json b/package.json index 60c2914952..eb41a3db33 100644 --- a/package.json +++ b/package.json @@ -26,10 +26,11 @@ "postgenerate": "yarn lint:write", "preinstall": "yarn config set ignore-engines true", "postinstall": "git submodule update --init --recursive && patch-package", - "build": "is-ci && yarn build:ci || yarn build:dev", - "build:base": "turbo run build --filter=!embedded-accounts-quickstart --filter=!ui-demo", - "build:dev": "yarn build:base --filter=!docs", - "build:ci": "yarn build:base && yarn lint:write", + "build": "yarn build:libs", + "postbuild": "yarn lint:write", + "build:libs": "turbo run build --filter='./account-kit/*' --filter='./aa-sdk/*' --filter='./libs/*'", + "build:demo": "turbo run build --filter=ui-demo", + "build:site": "turbo run build --filter=docs", "build:examples": "turbo run build", "clean": "yarn clean:turbo && yarn clean:node_modules", "clean:turbo": "turbo run clean", @@ -39,7 +40,6 @@ "test:ci": "vitest run", "lint:write": "eslint . --fix && yarn docs:gen && prettier --write --ignore-unknown .", "lint:check": "eslint . && prettier --check .", - "lint:ci:eslint": "eslint --format github $(git diff --name-only origin/main HEAD | xargs)", "prepare": "husky install", "version": "yarn build:dev" }, diff --git a/site/vercel.json b/site/vercel.json index 5ab32dbfd2..ef99b51198 100644 --- a/site/vercel.json +++ b/site/vercel.json @@ -1,4 +1,6 @@ { + "installCommand": "cd .. && yarn install --ignore-engines", + "buildCommand": "cd .. && yarn build:site", "redirects": [ { "source": "/getting-started/setup", diff --git a/turbo.json b/turbo.json index abd2f0bb38..ce8b8d065e 100644 --- a/turbo.json +++ b/turbo.json @@ -18,6 +18,7 @@ "dependsOn": ["^build"] }, "docs:gen": { + "dependsOn": ["ak-docgen#build"], "outputs": ["../../site/pages/reference/**"] }, "generate": {