-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added salad menu and random meal module
- Loading branch information
Showing
5 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
Binary file added
BIN
+230 KB
.../marmita-termopratica-revestida-em-aco-inox-3-unidades_MLB-F-183935740_5957.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.04 MB
.../marmita-termopratica-revestida-em-aco-inox-3-unidades_MLB-F-183935740_5957.psd
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
var menu = { | ||
salads: { | ||
base: ['Alface, Tomate, Cenoura', | ||
'Massa Salteada', | ||
'Arroz de Alho', | ||
'Batatinhas cozidas salteadas'] | ||
, main: ['Frango cozido', | ||
'Frango grelhado', | ||
'Camarão', | ||
'Delícias do Mar', | ||
'Queijo fresco', | ||
'Atum', | ||
'Fiambre aos cubos'] | ||
, secondary: ['Milho', | ||
'Cogumelos', | ||
'Azeitonas', | ||
'Ovo cozido', | ||
'Ervilhas', | ||
'Pimentos', | ||
'Couve roxa ripada', | ||
'Couve coração ripada', | ||
'Pepino', | ||
'Beterraba', | ||
['Feijão Frade', | ||
'Feijão Preto', | ||
'Feijão Encarnado', | ||
'Grão cozido'], | ||
'Nozes', | ||
'Amêndoas', | ||
'Alface', | ||
'Tomate', | ||
'Cenoutra ralada', | ||
'Maça', | ||
'Pera', | ||
'Abacaxi'] | ||
, drinks: ['Sumo natural de laranja', | ||
'Sumo natural de maçã', | ||
'Sumo natural de pera', | ||
'Sumo natural de frutos vermelhos', | ||
'Sumo natural de ananás', | ||
'Sumo natural de manga', | ||
'Sumo natural de maracujá'] | ||
} | ||
} | ||
module.exports = menu | ||
|
||
|
||
|
||
//Still to come | ||
// var dailyMenus = { | ||
// monday: { | ||
|
||
// }, | ||
// tuesday: { | ||
|
||
// }, | ||
// wednesday: { | ||
|
||
// }, | ||
// thursday: { | ||
|
||
// } | ||
// friday: { | ||
|
||
// }, | ||
// allDaysSpecials: { | ||
|
||
// } | ||
// } | ||
|
||
// var deserts = { | ||
|
||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
var menu = require('./menu.js') | ||
, inspect = require('util').inspect | ||
|
||
var randomMeal = function(){ | ||
var meal = { | ||
base: function () { | ||
return menu.salads.base[Math.floor((Math.random()*4))] | ||
}() | ||
, main: function () { | ||
return menu.salads.main[Math.floor((Math.random()*7))] | ||
}() | ||
, secondary: function () { | ||
var fourIngredients = [] | ||
var secondaries = menu.salads.secondary.slice(0) | ||
for (var i = 0; i < 4; i++) { | ||
var random = Math.floor(Math.random()*(19-i)) | ||
fourIngredients[i] = secondaries[random] | ||
if (fourIngredients[i] instanceof Array) { // you only want one of the beans | ||
fourIngredients[i] = secondaries[random][Math.floor((Math.random()*4))] | ||
} | ||
secondaries.splice(random, 1) // No repeated ingrediant for your salad :) | ||
} | ||
return fourIngredients | ||
}() | ||
, drinks: function () { | ||
return menu.salads.drinks[Math.floor((Math.random()*7))] | ||
}() | ||
} | ||
return meal | ||
} | ||
|
||
module.exports = randomMeal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{ | ||
"name": "marmita", | ||
"version": "0.0.0", | ||
"description": "A marmita-agnostic food exchange platform", | ||
"description": "The first Marmita Agnostic Food Order as a Service platform", | ||
"main": "index.js", | ||
"bin": { | ||
"marmita": "./bin/marmita.js" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
} | ||
}, | ||
"license": "MIT" | ||
} |