Conversation
|
Hmm, I see the problem - I don't remember where but we have had exactly the same issue (everywhere? :) BUT! I'm not sure if this approach will be usable for BE - we're storing their configuration in our repository - what if John has fonts in We need this configuration code - that for sure - but one thing - it's just few lines - do we need another request for this - it can be just inline script right? So maybe lets just create a partial with inline script - included in each Or did I not understand the problem here? :) |
# Conflicts: # source/layouts/layout.hbs
|
Hi @marbor3 I decided having a JS file because it can be easier to require dependencies in there if needed, though I agree with you that initially it should be "only some lines" and in this regard an inline script tag could maker it anyway. Additionally, some Editors/IDEs may have less support for editing JS code in an Regarding your first worry: this is a prototype, for COOP we already developed 2 projects for them without any issue. They understand that they have to recreate the configuration file for their needs, and they even have different ones for each co-worker, for tests systems or for production. A single parameter in each build system manages which file to load. Regarding the amount of information available in the configuration files: our prototype may need more or less, and backend integration requires normally that we adapt a couple of things. Then we adapt them and if they need we to add configuration params I cannot see any issue. Is this answering your questions? :) |
|
I like the switch from external files to a partial. However, I'd simplify this even more before merging into the default Estático setup:
IMHO, this would reduce the complexity a lot (no conditions in layout files, no hard-coded config in handlebars files) without losing any flexibility. I would assume that most projects don't have an acceptance env, so I'd setup the default for them. |
|
@orioltf, what is your opinion on simplifying this to adding an |
Proposal to add JS configuration file(s) which are not processed by Webpack. This is useful for backend developers, for instance, to properly point the css file to be loaded by the
fontLoader.