Skip to content

Commit

Permalink
feat(playground): import extra packages
Browse files Browse the repository at this point in the history
@ckb-ccc/core/advanced
@ckb-ccc/ccc/advanced
@ckb-ccc/spore
@ckb-ccc/spore/advanced
  • Loading branch information
Hanssen0 committed Jan 8, 2025
1 parent 837ac03 commit be9f312
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"dependencies": {
"@ckb-ccc/ccc": "workspace:*",
"@ckb-ccc/spore": "workspace:*",
"@ckb-ccc/connector-react": "workspace:*",
"@monaco-editor/react": "^4.6.0",
"axios": "^1.7.7",
Expand Down
7 changes: 7 additions & 0 deletions packages/playground/src/app/execute/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { ccc } from "@ckb-ccc/connector-react";
import * as cccLib from "@ckb-ccc/ccc";
import * as cccSporeLib from "@ckb-ccc/spore";
import * as cccAdvancedLib from "@ckb-ccc/ccc/advanced";
import * as cccSporeAdvancedLib from "@ckb-ccc/spore/advanced";
import { ReactNode } from "react";
import ts from "typescript";
import { vlqDecode } from "./vlq";
Expand Down Expand Up @@ -54,7 +57,11 @@ export async function execute(
const require = (path: string) => {
const lib = {
"@ckb-ccc/core": cccLib,
"@ckb-ccc/core/advanced": cccAdvancedLib,
"@ckb-ccc/ccc": cccLib,
"@ckb-ccc/ccc/advanced": cccAdvancedLib,
"@ckb-ccc/spore": cccSporeLib,
"@ckb-ccc/spore/advanced": cccSporeAdvancedLib,
"@ckb-ccc/playground": {
render: async (tx: ccc.Transaction | unknown) => {
if (!(tx instanceof ccc.Transaction)) {
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit be9f312

Please sign in to comment.