aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.tmuxinator.yml2
-rw-r--r--Makefile4
-rw-r--r--src/Food.purs15
-rw-r--r--src/Indicator.purs4
4 files changed, 16 insertions, 9 deletions
diff --git a/.tmuxinator.yml b/.tmuxinator.yml
index 680744a..2f71ef9 100644
--- a/.tmuxinator.yml
+++ b/.tmuxinator.yml
@@ -8,4 +8,4 @@ windows:
- build:
- fuser -k 9000/tcp
- webfsd -r public -f index.html -p 9000
- - yarn add pulp && bower install && make watch
+ - make install watch
diff --git a/Makefile b/Makefile
index 7f52139..2772fa5 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,10 @@ stop:
test:
@pulp test
+install:
+ @yarn install
+ @bower install
+
build:
@pulp build --to public/main.js
diff --git a/src/Food.purs b/src/Food.purs
index 2ced271..fb66c9d 100644
--- a/src/Food.purs
+++ b/src/Food.purs
@@ -19,7 +19,7 @@ glycemicLoad aliment = toNumber aliment.glycemicIndex * toNumber aliment.carbohy
all :: Array Aliment
all =
[ { name: "Abricot", glycemicIndex: 30, carbohydrates: 10 }
- , { name: "Abricot séché", glycemicIndex: 35, carbohydrates: 34 }
+ , { name: "Abricot séché", glycemicIndex: 35, carbohydrates: 44 }
, { name: "Ail", glycemicIndex: 30, carbohydrates: 25 }
, { name: "Amande", glycemicIndex: 15, carbohydrates: 17 }
, { name: "Amande en poudre", glycemicIndex: 20, carbohydrates: 17 }
@@ -67,10 +67,9 @@ all =
, { name: "Clémentine", glycemicIndex: 30, carbohydrates: 9 }
, { name: "Coeur de palmier", glycemicIndex: 20, carbohydrates: 11 }
, { name: "Coing", glycemicIndex: 35, carbohydrates: 14 }
- , { name: "Compote pomme", glycemicIndex: 35, carbohydrates: 18 }
+ , { name: "Compote de pomme", glycemicIndex: 35, carbohydrates: 18 }
, { name: "Concombre", glycemicIndex: 15, carbohydrates: 2 }
, { name: "Confiture de fruit", glycemicIndex: 65, carbohydrates: 60 }
- , { name: "Coquillettes", glycemicIndex: 55, carbohydrates: 13 }
, { name: "Cornichon", glycemicIndex: 15, carbohydrates: 2 }
, { name: "Coulis de tomate", glycemicIndex: 30, carbohydrates: 5 }
, { name: "Courgette", glycemicIndex: 15, carbohydrates: 3 }
@@ -182,7 +181,10 @@ all =
, { name: "Pain complet", glycemicIndex: 65, carbohydrates: 44 }
, { name: "Pain hamburger complet", glycemicIndex: 48, carbohydrates: 48 }
, { name: "Pastèque", glycemicIndex: 75, carbohydrates: 7 }
- , { name: "Pâte", glycemicIndex: 70, carbohydrates: 20 }
+ , { name: "Patate douce", glycemicIndex: 50, carbohydrates: 20 }
+ , { name: "Pâtes", glycemicIndex: 75, carbohydrates: 35 }
+ , { name: "Pâtes complètes", glycemicIndex: 45, carbohydrates: 19 }
+ , { name: "Pâtes (spaghettis al dente)", glycemicIndex: 45, carbohydrates: 25 }
, { name: "Pâte de fruit", glycemicIndex: 70, carbohydrates: 53 }
, { name: "Petit pois", glycemicIndex: 35, carbohydrates: 11 }
, { name: "Physalis", glycemicIndex: 25, carbohydrates: 6 }
@@ -190,11 +192,12 @@ all =
, { name: "Pistache", glycemicIndex: 15, carbohydrates: 15 }
, { name: "Poire", glycemicIndex: 30, carbohydrates: 14 }
, { name: "Poireau", glycemicIndex: 15, carbohydrates: 3 }
+ , { name: "Pois cassés", glycemicIndex: 22, carbohydrates: 22 }
, { name: "Pois chiches bouillis", glycemicIndex: 30, carbohydrates: 28 }
, { name: "Pois chiches", glycemicIndex: 30, carbohydrates: 19 }
, { name: "Poivron", glycemicIndex: 15, carbohydrates: 4 }
, { name: "Pomme", glycemicIndex: 35, carbohydrates: 19 }
- , { name: "Pomme de terre au four", glycemicIndex: 95, carbohydrates: 23 }
+ , { name: "Pommes de terre au four", glycemicIndex: 95, carbohydrates: 23 }
, { name: "Pommes de terre", glycemicIndex: 65, carbohydrates: 19 }
, { name: "Potimarron", glycemicIndex: 80, carbohydrates: 6 }
, { name: "Potiron", glycemicIndex: 80, carbohydrates: 5 }
@@ -234,7 +237,7 @@ all =
, { name: "Yaourt", glycemicIndex: 35, carbohydrates: 5 }
, { name: "Yaourt brassé nature", glycemicIndex: 35, carbohydrates: 6 }
- , { name: "yaourt lait de brebis", glycemicIndex: 35, carbohydrates: 4 }
+ , { name: "Yaourt lait de brebis", glycemicIndex: 35, carbohydrates: 4 }
, { name: "Yaourt lait entier", glycemicIndex: 35, carbohydrates: 5 }
, { name: "Yaourt nature", glycemicIndex: 35, carbohydrates: 5 }
diff --git a/src/Indicator.purs b/src/Indicator.purs
index 751c069..29daa4f 100644
--- a/src/Indicator.purs
+++ b/src/Indicator.purs
@@ -15,6 +15,6 @@ className Bad = "bad"
fromGlycemicLoad :: Number -> Indicator
fromGlycemicLoad n
- | n <= 10.0 = Good
- | n < 20.0 = Medium
+ | n <= 8.0 = Good
+ | n <= 20.0 = Medium
| otherwise = Bad