Skip to content

Commit

Permalink
fix(workflows): update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Oct 24, 2024
1 parent 5a4d8d3 commit da6dbeb
Show file tree
Hide file tree
Showing 16 changed files with 306 additions and 366 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Production Deploy

on:
push:
branches:
- alpha
- main
workflow_dispatch:
workflow_call:
jobs:
build:
uses: ./.github/workflows/build.yml
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: 20.x
- run: yarn --frozen-lockfile
- run: yarn publish-docs
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
DEPLOY_ANT_PROCESS_ID: ${{ secrets.DEPLOY_ANT_PROCESS_ID }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

storybook-static
docs
wallet.json
publish-wallet.json
node_modules
dist
dist-ssr
Expand Down
7 changes: 6 additions & 1 deletion .storybook/main.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
module.exports = {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
stories: [
'../src/**/*.mdx',
'../src/**/*.stories.@(js|jsx|ts|tsx)',
'../docs/**/*.mdx',
'../docs/**/*.stories.@(js|jsx|mjs|ts|tsx|svelte)',
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@
],
"scripts": {
"dev": "vite",
"build": "tsc && vite build && yarn build-storybook",
"build": "vite build",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"build-docs": "typedoc --out docs src",
"build-storybook": "yarn build-docs && storybook build",
"build-docs": "typedoc",
"publish-docs": "yarn build-storybook && permaweb-deploy --ant-process $DEPLOY_ANT_PROCESS_ID --undername ao-wallet-kit --deploy-folder storybook-static",
"serve-docs": "http-server storybook-static --port 8080",
"test": "echo \"Warning: no test specified\"",
"format": "prettier . --write",
"lint": "eslint src"
Expand Down Expand Up @@ -83,6 +85,7 @@
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@linaria/vite": "^4.2.11",
"@rwsdatalab/typedoc-storybook-theme": "^1.2.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
Expand Down Expand Up @@ -112,6 +115,7 @@
"eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^8.0.0",
"http-server": "^14.1.1",
"husky": "^8.0.3",
"markdown-toc-gen": "^1.0.1",
"node-stdlib-browser": "^1.2.1",
Expand All @@ -121,7 +125,7 @@
"rollup-plugin-preserve-directives": "^0.2.0",
"semantic-release": "^21.0.7",
"storybook": "^7.0.22",
"typedoc": "^0.26.10",
"typedoc": "0.25.0",
"typescript": "^4.9.3",
"vite": "^4.0.0",
"vite-plugin-banner": "^0.7.0",
Expand Down
3 changes: 3 additions & 0 deletions src/components/Modal/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './Footer';
export * from './Head';
export * from './Modal';
8 changes: 8 additions & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export * from './Title';
export * from './Provider';
export * from './Paragraph';
export * from './Loading';
export * from './ConnectButton';
export * from './Button';
export * from './Application';
export * from './Modal';
2 changes: 2 additions & 0 deletions src/hooks/connection/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import useConnect from './connect';
import useConnected from './connected';
import useDisconnect from './disconnect';

export { useConnect, useConnected, useDisconnect };

/**
* Base connection hook
*/
Expand Down
13 changes: 13 additions & 0 deletions src/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export * from './useAns';
export * from './strategy';
export * from './profile';
export * from './permissions';
export * from './permissions';
export * from './modal';
export * from './mobile';
export * from './global';
export * from './gateway';
export * from './balance';
export * from './addresses';
export * from './active_address';
export * from './connection';
17 changes: 6 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
export { default as useAddresses, useWalletNames } from './hooks/addresses';
export { default as ConnectButton } from './components/ConnectButton';
export { default as usePermissions } from './hooks/permissions';
export { default as useConnection } from './hooks/connection';
export { default as useProfileModal } from './hooks/profile';
export { useApi, useStrategy } from './hooks/strategy';
export { ArweaveWalletKit } from './components/Provider';
export {
default as useActiveAddress,
usePublicKey,
} from './hooks/active_address';
export * from './components';
export * from './context';
export * from './hooks';
export * from './modals';
export * from './utils';
export * from './strategy';
3 changes: 3 additions & 0 deletions src/modals/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './Connect';
export * from './Profile';
export * from './RestoreSession';
2 changes: 2 additions & 0 deletions src/types/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare module 'viem';
declare module '@wagmi/core';
4 changes: 4 additions & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './arweave';
export * from './ethereum';
export * from './encoding';
export * from './chains';
35 changes: 21 additions & 14 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"target": "esnext",
"allowSyntheticDefaultImports": true,
"strict": true,
"lib": ["esnext", "DOM"],
"outDir": "./lib/esm",
"listEmittedFiles": false,
"listFiles": false,
"moduleResolution": "node",
"module": "esnext",
"alwaysStrict": true,
"types": ["node", "DOM"],
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"esModuleInterop": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"typeRoots": ["./node_modules/@types", "./src/types"] // <- Add this line
"declaration": true,
"declarationDir": "./lib/types",
/* Additional Checks */
"pretty": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"strictNullChecks": true
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
"exclude": ["node_modules"]
}
9 changes: 0 additions & 9 deletions tsconfig.node.json

This file was deleted.

15 changes: 13 additions & 2 deletions typedoc.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
/** @type {Partial<import('typedoc').TypeDocOptions>} */

const config = {
entryPoints: ['./src/index.ts', './src/secondary-entry.ts'],
out: 'doc',
name: 'ao-wallet-kit',
entryPointStrategy: 'expand',
entryPoints: ['./src'],
out: 'docs',
// requires typedoc@0.25.0
plugin: ['@rwsdatalab/typedoc-storybook-theme'],
sourceLinkTemplate:
'https://github.com/project-kardeshev/ao-wallet-kit/-/blob/{gitRevision}/{path}#L{line}',
tsconfig: 'tsconfig.json',
readme: './README.md',
githubPages: false,
exclude: ['**/node_modules/**/*', '**/dist/**/*'],
skipErrorChecking: true,
};

export default config;
Loading

0 comments on commit da6dbeb

Please sign in to comment.