Skip to content

Commit

Permalink
fix: set correctly the main and types file in the package.json (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia authored Jan 27, 2024
1 parent 2fd6d79 commit 30666be
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/mean-students-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@coinbase/onchainkit": patch
---

- **docs**: kickoff docs for `generateFrameNextMetadata` core utility
- **fix**: set correctly the `main` and `types` file in the `package.json`
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# [OnchainKit](https://github.com/coinbase/onchainkit/)

> OnchainKit is a collection of CSS and React components specifically crafted to enhance your creativity when building onchain applications.
> OnchainKit is a collection of CSS, React components and Core utilities specifically crafted to enhance your creativity when building onchain applications.
## Core utilities

### generateFrameNextMetadata

Next App `page.ts`
```ts
// Steps 1. import generateFrameNextMetadata from @coinbase/onchainkit
import { generateFrameNextMetadata } from '@coinbase/onchainkit';
import type { Metadata } from 'next';
import HomePage from './home';

// Step 2. Use generateFrameNextMetadata to shape your Frame metadata
const frameMetadata = generateFrameNextMetadata({
buttons: ['boat'],
image: 'https://build-onchain-apps.vercel.app/release/v-0-17.png',
post_url: 'https://build-onchain-apps.vercel.app/api/frame',
});

// Step 3. Add your metadata in the Next.js metadata utility
export const metadata: Metadata = {
manifest: '/manifest.json',
other: {
...frameMetadata
},
};

export default function Page() {
return <HomePage />;
}
```
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"dist/"
],
"type": "commonjs",
"main": "./dist/src/index.js",
"typings": "./dist/src/index.d.ts",
"main": "./dist/lib/index.js",
"typings": "./dist/types/index.d.ts",
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ☕️
const version = '0.1.1';
const version = '0.1.2';

// TODO remove this line from here
export { generateFrameNextMetadata } from './core/generateFrameNextMetadata';

0 comments on commit 30666be

Please sign in to comment.