You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO if I comment any of those cases - i wouldnt get any warning or something in our command line.
import{isFolderExists}from'./domain/write';import{generateReactFullTemplate}from'./templates/NewsletterReactTemplate';import{generateFullTemplateHackernoon}from'./templates/HackernoonTemplate';//-------------------// @TODO add path package, in order to make it work PERFECTLYconstFULL_SOURCE='source/source.md';isFolderExists('./generated');isFolderExists('./tests/_generated');console.log('Mode',process.env.PARSE);// TODO if I comment any of those cases - i wouldnt get any warning or something in our command line.constmodeMap={full: ()=>generateFullTemplateHackernoon(FULL_SOURCE),// reactContentOnly: () => generateReactContent(CONTENT_SOURCE),reactFull: ()=>generateReactFullTemplate(FULL_SOURCE),};modeMap[process.env.PARSE??'full']();
The text was updated successfully, but these errors were encountered:
hmm. I mean, probably there was an issue with my code, but the reason why I created this issue is different.
i mean that it's hard to manage items from this array. while we protected our main page - we still don't have a proper way to get an error. Imagine this situation - this generator was used for creating 100 different templates - do you think this structure will be able to handle that?
I don't think that the object can cause any errors. switch is not so good, because it's hard to read and understand what is going on. also there are some troubles with switch block, and it's recommended to use object instead
reactFull: () => generateReactFullTemplate(FULL_SOURCE),
markdown-to-email/src/index.js
Line 14 in 54325ce
The text was updated successfully, but these errors were encountered: