Small fixes to the doc and to the odoc build script
This commit is contained in:
parent
ec4db9b01e
commit
8b639e5231
@ -52,9 +52,10 @@ stages:
|
|||||||
- npm run version next
|
- npm run version next
|
||||||
- npm run build
|
- npm run build
|
||||||
# move internal odoc documentation to the website folder
|
# move internal odoc documentation to the website folder
|
||||||
- mkdir -p gitlab-pages/website/build/ligo/
|
- mkdir -p build/ligo/
|
||||||
- mv ../../_build/default/_doc/_html/ gitlab-pages/website/build/ligo/odoc
|
- mv ../../_build/default/_doc/_html/ build/ligo/odoc
|
||||||
- ls gitlab-pages/website/build/ligo/ # for debug
|
- pwd # for debug
|
||||||
|
- ls build/ligo/ # for debug
|
||||||
after_script:
|
after_script:
|
||||||
- cp -r gitlab-pages/website/build/ligo public
|
- cp -r gitlab-pages/website/build/ligo public
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -158,4 +159,4 @@ pages:
|
|||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- dev
|
- dev
|
||||||
- feature/#3-add-odoc-to-website
|
- feature/website-fixes
|
||||||
|
@ -20,7 +20,7 @@ To help Pedro open his dream taco shop, we'll implement a smart-contract, that w
|
|||||||
|
|
||||||
Pedro's tacos are a rare delicacy, so their **price goes up**, as the **stock for the day begins to deplete**.
|
Pedro's tacos are a rare delicacy, so their **price goes up**, as the **stock for the day begins to deplete**.
|
||||||
|
|
||||||
Each taco kind, has it's own `max_price` that it sells for, and a finite supply for the current sales lifecycle.
|
Each taco kind, has its own `max_price` that it sells for, and a finite supply for the current sales lifecycle.
|
||||||
|
|
||||||
> For the sake of simplicity, we won't implement replenishing of the supply after it runs out.
|
> For the sake of simplicity, we won't implement replenishing of the supply after it runs out.
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ end
|
|||||||
type taco_shop_storage is map(nat, taco_supply);
|
type taco_shop_storage is map(nat, taco_supply);
|
||||||
```
|
```
|
||||||
|
|
||||||
Next step is to update the `main` entry point to include `taco_shop_storage` as it's storage - while doing that let's set the `parameter` to `unit` as well to clear things up.
|
Next step is to update the `main` entry point to include `taco_shop_storage` as its storage - while doing that let's set the `parameter` to `unit` as well to clear things up.
|
||||||
|
|
||||||
**`taco-shop.ligo`**
|
**`taco-shop.ligo`**
|
||||||
```Pascal
|
```Pascal
|
||||||
@ -189,7 +189,7 @@ end"
|
|||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
*If everything went as expected, the `dry-run` command will return the contract's current storage, which is the map of products we've defined based on the daily offer of Pedro's taco shop.*
|
*If everything went as expected, the `dry-run` command will return an empty list of operations and the contract's current storage, which is the map of products we've defined based on the daily offer of Pedro's taco shop.*
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -293,7 +293,7 @@ function buy_taco (const taco_kind_index: nat ; var taco_shop_storage : taco_sho
|
|||||||
In order to test the `amount` sent, we'll use the `--amount` option of `dry-run`:
|
In order to test the `amount` sent, we'll use the `--amount` option of `dry-run`:
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
ligo dry-run taco-shop.ligo--syntax pascaligo --amount 1 buy_taco 1n "map
|
ligo dry-run taco-shop.ligo --syntax pascaligo --amount 1 buy_taco 1n "map
|
||||||
1n -> record
|
1n -> record
|
||||||
current_stock = 50n;
|
current_stock = 50n;
|
||||||
max_price = 50000000mtz;
|
max_price = 50000000mtz;
|
||||||
|
Loading…
Reference in New Issue
Block a user