From 5c03f720ebdc8f4db7097bd6ead32dc3378bf29c Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sat, 21 Dec 2024 14:43:00 +0400 Subject: [PATCH 1/2] Simplify recipe fields --- README.md | 20 -------------------- cadence/transaction.cdc | 1 - index.js | 12 ------------ 3 files changed, 33 deletions(-) delete mode 120000 cadence/transaction.cdc diff --git a/README.md b/README.md index dd650f2..ec234a0 100644 --- a/README.md +++ b/README.md @@ -57,12 +57,6 @@ recipe-name/ - `author`: contributor of the recipe - `playgroundLink`: a link to Flow Playground containing the deployed recipe code - `excerpt`: a brief description of the recipe contents -- `smartContractCode`: path to location of Cadence smart contract code example -- `smartContractExplanation`: path to location of smart contract code explanation -- `transactionCode`: path to location of Cadence transaction code example -- `transactionExplanation`: path to location of transaction code explanation -- `testsPath`: path to location of Cadence test cases code example -- `testsExplanationPath`: path to location of test cases code explanation - `filters`: the filters object is used to perform filtering on recipes in the cookbook - `difficulty`: the difficulty filter supports one of ['beginner', 'intermediate', 'advanced'] @@ -71,16 +65,6 @@ recipe-name/ // Pass the repo name const recipe = "sample-recipe-name"; -//Generate paths of each code file to render -const contractPath = `${recipe}/cadence/contract.cdc`; -const transactionPath = `${recipe}/cadence/transaction.cdc`; -const testsPath = `${recipe}/cadence/tests.cdc`; - -//Generate paths of each explanation file to render -const smartContractExplanationPath = `${recipe}/explanations/contract.txt`; -const transactionExplanationPath = `${recipe}/explanations/transaction.txt`; -const testsExplanationPath = `${recipe}/explanations/tests.txt`; - export const sampleRecipe= { slug: recipe, title: "", @@ -89,10 +73,6 @@ export const sampleRecipe= { author: "", playgroundLink: "", excerpt: "", - smartContractCode: contractPath, - smartContractExplanation: smartContractExplanationPath, - transactionCode: transactionPath, - transactionExplanation: transactionExplanationPath, }; ``` ## Deploying Recipe Contracts and Running Transactions Locally (Flow Emulator) diff --git a/cadence/transaction.cdc b/cadence/transaction.cdc deleted file mode 120000 index e93c693..0000000 --- a/cadence/transaction.cdc +++ /dev/null @@ -1 +0,0 @@ -./cadence/transactions/purchase_nft.cdc \ No newline at end of file diff --git a/index.js b/index.js index 992bcd4..6fb44fc 100644 --- a/index.js +++ b/index.js @@ -1,14 +1,6 @@ // Pass the repo name const recipe = "purchase-nft-on-marketplace"; -//Generate paths of each code file to render -const contractPath = `${recipe}/cadence/contract.cdc`; -const transactionPath = `${recipe}/cadence/transaction.cdc`; - -//Generate paths of each explanation file to render -const smartContractExplanationPath = `${recipe}/explanations/contract.txt`; -const transactionExplanationPath = `${recipe}/explanations/transaction.txt`; - export const purchaseNftOnMarketplace = { slug: recipe, title: "Purchase NFT on Marketplace", @@ -17,10 +9,6 @@ export const purchaseNftOnMarketplace = { playgroundLink: "https://play.onflow.org/1d11f838-fc0e-4e7f-86e3-6d1a5a1098e3?type=tx&id=7c4fa7ca-5770-4dd4-97d3-ed575f208d22&storage=none", excerpt: "Buy an NFT from a marketplace.", - smartContractCode: contractPath, - smartContractExplanation: smartContractExplanationPath, - transactionCode: transactionPath, - transactionExplanation: transactionExplanationPath, filters: { difficulty: "intermediate", }, From f8119222f170dc6f7653bc5e1fd34f5ac536c174 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sat, 21 Dec 2024 14:43:53 +0400 Subject: [PATCH 2/2] Simplify recipe fields --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ec234a0..b2e2fab 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ recipe-name/ // Pass the repo name const recipe = "sample-recipe-name"; -export const sampleRecipe= { +export const sampleRecipe = { slug: recipe, title: "", featuredText: "",