From 4cf88458964c9b95d5fa6d2724a9d84194d29d5c Mon Sep 17 00:00:00 2001 From: bobinstein Date: Wed, 10 Jan 2024 19:42:05 -0500 Subject: [PATCH] feat: Installed code copy plugin installed plugin that makes all code blocks have a simple "copy" button --- docs/package.json | 7 ++++--- docs/src/.vuepress/config.js | 2 ++ docs/yarn.lock | 5 +++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/package.json b/docs/package.json index 2729c3a0..ba343cee 100755 --- a/docs/package.json +++ b/docs/package.json @@ -18,12 +18,13 @@ "license": "MIT", "devDependencies": { "@bundlr-network/client": "^0.9.11", - "arweave": "^1.11.8", - "prettier": "^2.8.4", - "vuepress": "2.0.0-beta.61", + "@snippetors/vuepress-plugin-code-copy": "^1.2.3", "@vuepress/plugin-container": "2.0.0-beta.61", "@vuepress/plugin-medium-zoom": "2.0.0-beta.61", "@vuepress/plugin-search": "2.0.0-beta.61", + "arweave": "^1.11.8", + "prettier": "^2.8.4", + "vuepress": "2.0.0-beta.61", "warp-contracts": "^1.2.37" }, "dependencies": { diff --git a/docs/src/.vuepress/config.js b/docs/src/.vuepress/config.js index de550434..bcabfd59 100644 --- a/docs/src/.vuepress/config.js +++ b/docs/src/.vuepress/config.js @@ -4,6 +4,7 @@ import { defaultTheme } from "@vuepress/theme-default"; import { containerPlugin } from "@vuepress/plugin-container"; import { mediumZoomPlugin } from "@vuepress/plugin-medium-zoom"; import { searchPlugin } from "@vuepress/plugin-search"; +import codeCopyPlugin from '@snippetors/vuepress-plugin-code-copy' import createSidebars from "./sidebar"; import { languages } from "../../languages/def"; @@ -99,6 +100,7 @@ export default { }, }, }), + codeCopyPlugin({}) ], // passing languages def to client side diff --git a/docs/yarn.lock b/docs/yarn.lock index 0253fe8a..a2e7c139 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -710,6 +710,11 @@ "@noble/hashes" "~1.1.1" "@scure/base" "~1.1.0" +"@snippetors/vuepress-plugin-code-copy@^1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@snippetors/vuepress-plugin-code-copy/-/vuepress-plugin-code-copy-1.2.3.tgz#4cc5f7ef7530ff6654786f6baa2e15ca4ffb8b14" + integrity sha512-PiUbhlYseY4UqsE/ike/Up27GkrbHvR7OJqV5nlmHEW141uWcrVaBZsBS870ckqNF+vd2fk8g4TyoiHvxaUzSg== + "@solana/buffer-layout@^4.0.0": version "4.0.1" resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15"