-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generator module should be independent [Main task] #209
Comments
@atherdon I really don't understand the mentioned details and the context. Can you please summarize or elaborate more |
ask a specific question, please.
what exactly not clear?
|
From reading the comments in the file import { write } from "./fileSystem";
import getMenuGenerator from "./utils";
const generateFile = (path, callback) => {
// not sure how the callback can be passed as an attribute getMenuGenerator method.
const data = callback()
write(path, data);
};
module.exports = generateFile; Am I on the right track? |
I made a video, take a look: https://www.loom.com/share/6df49e613a274aac93ff34c7f13bbdef |
@vadim9999 can you jump into this task? |
@atherdon Do I need to implement the callback or something else? |
@Mishra121 can you explain more or maybe show your code change at pull request? Because now it's not clear for me |
@saphal1998 please check this video - it will give you some details what to do next https://www.loom.com/share/2ec12f1a007b47b484a813ac9979e71b |
Firstly, Sorry for the delay. I was a bit occupied since the past two days. As far as I understood, you're looking to modularise the generator code to individual folders in projects3.0. So I will try and just see how this code works for now and send a pull request when I see some changes that I can make. Thanks for filling me in @atherdon |
@saphal1998 not a problem at all. sure go ahead |
@atherdon I'm having a hard time understanding what WeeklyMenu does. I have run the functions individually but can you please describe what is the agenda of all the individual files in the src folder. For example:
in the index.js of WeeklyMenu, what does it mean here? it works fine if we send any parameters, so I think I just need a better idea of what is to be done with this module exactly. |
Ok, the weekly menu is just a set of recipes, related to a particular week.
this is just part of the functionality that we're developing.
you can think about it as a collection of recipes, filtered by some sort of
filter.
my goal with separation is to be able to manipulate with that data without
any worries that other parts of the project will be broken.
I'm trying to create the same way of content inside of projects/*/src
folder - this is why I create all of those files. we may change it later,
but for now, it's just for simplicity. when we will make other projects
also work inside of this repository - we'll move them away, because they
create a lot of confusion inside of this repository.
… |
@atherdon I was working on the Measurements directory. I wanted to know why all the code in methods.js has been commented out. Could you explain to me what the file is doing?
Upon being run independently, these aren't yielding any outputs either, so if you could tell me what each of these is doing, perhaps I can write a function to mimic its functionality. |
sure, the reason why I did it because I want to move out all methods from
our old es5 version.
So I create a folder(yeah, it getting a bit confusing) and there I'm
storing separated modules for each of our projects. I don't recall if the
method related to measurement direction was actually finished, but if you
go to package.json and see there some modules related to data-methods - it
should contain all information/methods. take a look at how it works at
WeeklyMenu - I assume i finished my changes for that project completely.
… |
Is your feature request related to a problem? Please describe.
Some history:
src
folder we have few files that a rudimentary, from old times. Files like (configGenerator.js
+GenerateFile
/GenerateFiles
/GenerateArray
)Our goal is to adjust our methods (i think we talking about methods from
fileSystem.js
) in order to accept functions, that change the structure of objects from the outside of this module.For this case we have Promises at our main methods at
fileSystem.js
I think we not finished code for
read
method(#194)Is it was created as task at GitHub issues? Please provide an issue number or link
#100 #194
Describe the solution you'd like
I want to be able to create a function at sd repository, that will be able to be passed inside of generator methods like read/write and it will work.
Additional context
@vadim9999 @Beni03 @edward-hong @IamRaviTejaG @AndrewSerra @svr8 @sarthakvijayvergiya
Links to files:
https://github.com/GroceriStar/food-static-files-generator/blob/master/src/generateFile.js
https://github.com/GroceriStar/food-static-files-generator/blob/master/src/generateFiles.js
https://github.com/GroceriStar/food-static-files-generator/blob/master/projects/configGenerator.js
https://github.com/GroceriStar/food-static-files-generator/blob/master/projects/menuGenerator.js
The text was updated successfully, but these errors were encountered: