Initial CookieCode MVP
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
CookieCode.configurer({
|
||||
sortie: "#app",
|
||||
afficherNotions: true,
|
||||
});
|
||||
|
||||
CookieCode.recette("Cookie au chocolat")
|
||||
.prendre("farine", 200, "g")
|
||||
.prendre("sucre", 100, "g")
|
||||
.prendre("chocolat", 150, "g")
|
||||
.utiliser("saladier")
|
||||
.ajouter("farine")
|
||||
.ajouter("sucre")
|
||||
.ajouter("chocolat")
|
||||
.melanger()
|
||||
.repeter(2, (recette) => {
|
||||
recette.melanger();
|
||||
})
|
||||
.cuire(12, "minutes")
|
||||
.servir();
|
||||
@@ -0,0 +1,18 @@
|
||||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>CookieCode - Demo</title>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>CookieCode</h1>
|
||||
<p>Une recette devient un programme : les ingredients sont des variables, les actions sont des fonctions.</p>
|
||||
<div id="app" aria-live="polite"></div>
|
||||
</main>
|
||||
|
||||
<script src="../dist/cookiecode.js"></script>
|
||||
<script src="./demo.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user