Open atherdon opened 6 years ago
Как переместить файл в текущий репозиторий?
1) open https://github.com/GroceriStar/groceristar
2) click Fork button
3) wait until fork will be done to your github account
4) git clone
your version of groceristar repository
5) copy that files
6) paste to folder, related to this repo
7) git add *
+ git commit
+ git push
ok, so what the progress of this task? is it completed and i can start your code review?
I have moved files from groceristar in this repository. Copy and past arrays in separated files and replace departments[index].id on the department name. The task is completed.
Ok, can you remove arrays from prev files and include them from separated files? @vadim9999
@atherdon I have redone this task. If I make a modules data.js export function square(x) { console.log(x); return x * x; } //-------------------- mymodule.js import {square} from './data'; console.log(square(2)); //------------------ index.html
I can't see results of console.log(square(2)); How can I see it? In articles writes that needs module loader (SystemJS,RequireJS, stealjs and other)
because you're using es6 syntax. try require(filepath) instead of import.
Second assessment -
data
folder. also please keep a similar structure for arrays.yeah - you tried to launch file that requires compilation before execution and also you run it without nodejs server but don't rush this- we;'ll get there
@atherdon I need to delete departments.js and departmentsAttributes.js then leave departments.js? And in departments.js delete import statement and replace file extension from js into json? I have created in data folder Departments
please extend your question. not very clear. for JSON: yes
On 04-Jul-2018 at 03:26 PM, Vadim wrote:
@atherdon https://github.com/atherdon I need to delete departments.js and departmentsAttributes.js then leave departments.js? And in departments.js delete import statement and replace file extension from js into json?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vadim9999/js/issues/5#issuecomment-402509424, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDqBdNYU2SQGAia6fSx5Mrt6V-zJdks5uDN6qgaJpZM4U_MWO .
@atherdon I have cloned this repo https://github.com/GroceriStar/groceristar-fetch on my hdd. I've made tasks. What to do next? where to push this?
push it on grocery-fetch repo :)
@atherdon In project grocery-fetch the main file is index.js. In index.js function require() works like import modules. In arguments of require() is a path to json file. There are a function parser that retrieve data stored in folder "data". Also there are getters which returns arrays. I think it's application is a control of restaurant or other institution. Creating dishes considering allergies on food. Control count of food.
@vadim9999 Good!
ok, so right now data
folder contains static information that we're using in our Search API server and at our Advanced Search Form(frontend part). as it has same code - i decide to move it to a separate place with good test coverage.
But when you'll move data, related to Groceristar project - this package will have static data, related to our 3 projects. And it's necessary to keep logic separated, agree?
So please take your time, and think about the step-by-step plan:
and please put this plan here, so i'll be able to review it, before we'll start an actual work
btw, if terminology like git commit
, git push
is not clear - tell me. i'll create a separated course for git learning for you
@atherdon I know this commands. When I tried to push on https://github.com/GroceriStar/groceristar-fetch It was denied access. I have fork and cloned this repo, made some work and excecute git add *. Then I have git commit -m "arrays". After that I git push https://github.com/vadim9999/groceristar-fetch
please go to Pull Requests and create a pull request to main repository
@atherdon Plan
Add searching by recipes, ingredients, allergies with pop-up menu.
Icons on each ingredients.
Opportunity to share recipes with other people by facebook, twitter and other social networks.
Add cloud storage or something.
keep in mind that main cool feature of this plugin is simplicity. so it'll keep only static json files and maybe some wrappers.
for search form - we have a separated repo - i'll show it you soon.
basically, all your points are related to main our project. and it's cool, but for now, we need to focus on this small piece of code here.
@atherdon Why in this code typeof returns object? I thought foo is an array var foo = ['Apple','Mango']; console.log(typeof foo);
arrays and objects are same in JS. because their types are not strict.
On 09-Jul-2018 at 07:47 PM, Vadim wrote:
@atherdon https://github.com/atherdon Why in this code typeof returns object? I thought foo is an array var foo = ['Apple','Mango']; console.log(typeof foo);
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vadim9999/js/issues/5#issuecomment-403598283, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDnFNKqOk3tA2zDE5hkt1gF-rRzEoks5uE7NZgaJpZM4U_MWO .
Move this files in current repository
[x] https://github.com/GroceriStar/groceristar/blob/master/bin/old-delete-later/grocery/departments.js
[x] https://github.com/GroceriStar/groceristar/blob/master/bin/old-delete-later/grocery/grocery.js
[x] https://github.com/GroceriStar/groceristar/blob/master/bin/old-delete-later/grocery/ingredients.js
[x] https://github.com/GroceriStar/groceristar/blob/master/bin/old-delete-later/grocery/users.js
[x] move arrays into separated files. Check this example: https://github.com/GroceriStar/static-data/blob/master/dist/data/simple/cuisines.js
[x] insead of departments[index].id - replace with departments name. we'll keep that arrays simple, without additional logic for now