-
Notifications
You must be signed in to change notification settings - Fork 880
Style Guide - Assets folder needed #1362
Comments
There are a few points we discussed. Maybe we should start by deciding if we want to have one issue to discuss them all or split this out. The main points were:
I'll focus first on the first question first. I prefer For the second issue I I don't think I understand the driving motivation behind having multiple apps in the same repo. 2 use cases come to mind quickly though:
However is it better to add a source code level folder for shared assets or to put these in an npm package? Or do we care at all and make that user choice? I think I'm fine with multiple in a repo, but I am also fine with splitting these into separate repos for each project. Ive done it both ways and they both have pros and cons. Both ways ultimately work and have no serious flaws, so to me it is "user choice" Right now with the information I have, I lean towards Comments and feedback welcome :) |
Point 1 : NamingI like the naming of Would Point 2 : Multiple app dirsI like the encapsulation of source and assets under an app subfolder. How will the assets folders per app map to www root?
Just keep in mind the mental mapping that will need to occur for URL paths. It would be great if the default pattern is straightforward for devs to understand that if an asset is put "here", they will be able to reference it via simple rules. Mentioning because this had become a problem with some large projects I've seen with deep levels of sub-apps/modules and inconsistent folder patterns. And to clarify, not saying we shouldn't restrict someone from doing complex dir mappings if they wanted to, just when considering the default output behavior from CLI and general style guide recommendations. |
I'd prefer singular |
There were some points brought offline against
public/
, so the name should beassets/
to avoid confusion and collision.A project might be comprised of multiple apps;
mobile/
,e2e/
,demo/
,client/
, ... Library developers might have more, depending on their need. More typically, a project will have a single app insrc/
.Each apps could have its own
assets/
folder, and a global one could be used and shared amongst different apps.The text was updated successfully, but these errors were encountered: