Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify recipe fields #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand All @@ -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: "",
Expand All @@ -89,10 +73,6 @@ export const sampleRecipe= {
author: "",
playgroundLink: "",
excerpt: "",
smartContractCode: contractPath,
smartContractExplanation: smartContractExplanationPath,
transactionCode: transactionPath,
transactionExplanation: transactionExplanationPath,
};
```

Expand Down
1 change: 0 additions & 1 deletion cadence/contract.cdc

This file was deleted.

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 = "creating-a-vault";

//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 creatingAVault = {
slug: recipe,
title: "Creating a Vault",
Expand All @@ -18,10 +10,6 @@ export const creatingAVault = {
"https://play.onflow.org/ef2fe054-148b-4c75-94f1-95bd33b6ce00?type=tx&id=1629c020-d908-475e-87db-c81d1c496964",
excerpt:
"This explains the function that would be used for you to create a new vault in others accounts.",
smartContractCode: contractPath,
smartContractExplanation: smartContractExplanationPath,
transactionCode: transactionPath,
transactionExplanation: transactionExplanationPath,
filters: {
difficulty: "intermediate",
},
Expand Down