Skip to content

Commit

Permalink
Simplify recipe fields
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Dec 21, 2024
1 parent 8ea697c commit a6dc99a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 34 deletions.
22 changes: 1 addition & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,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']

Expand All @@ -69,28 +63,14 @@ 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= {
export const sampleRecipe = {
slug: recipe,
title: "",
featuredText: "",
createdAt: Date(2022, 3, 1),
author: "",
playgroundLink: "",
excerpt: "",
smartContractCode: contractPath,
smartContractExplanation: smartContractExplanationPath,
transactionCode: transactionPath,
transactionExplanation: transactionExplanationPath,
};
```
## Deploying Recipe Contracts and Running Transactions Locally (Flow Emulator)
Expand Down
1 change: 0 additions & 1 deletion cadence/transaction.cdc

This file was deleted.

12 changes: 0 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
// Pass the repo name
const recipe = "minting-a-moment-in-topshot-set";

//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 mintingAMomentInTopShotSet = {
slug: recipe,
title: "Minting a Moment in TopShot Set",
Expand All @@ -18,10 +10,6 @@ export const mintingAMomentInTopShotSet = {
"https://play.onflow.org/15c1e86e-010c-4a7c-bcfd-98a1bddc36a7?type=tx&id=d24e3b31-7576-4e7e-b27e-2ed422406187&storage=none",
excerpt:
"You've added plays in your set, now it's time to mint them. This code will mint moments or plays in your TopShot sets.",
smartContractCode: contractPath,
smartContractExplanation: smartContractExplanationPath,
transactionCode: transactionPath,
transactionExplanation: transactionExplanationPath,
filters: {
difficulty: "intermediate",
},
Expand Down

0 comments on commit a6dc99a

Please sign in to comment.