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
Inspired by the discussion in this PR, we can remove the shared directory prefix to allow for cleaner manifests and easier usage. This would make the @bufferapp/static-assets library simpler and custom solutions to be cleaner as well.
Since most apps are never referencing ./public in their code, it makes sense to remove it, potentially by default. To do this we could:
Automatically remove the word public as a prefix directory
Check all file globs and remove any common base directory that is shared by all
Change the structure of the globs to be simpler or allow for a directory prefix input, ex. `buffer-static-upload -prefix public -files 'js/.js,css/.css'
The text was updated successfully, but these errors were encountered:
@djfarrelly, one potential issue with this is, if someone uploads 2 files with the same name, one from the root dire ./ and the other from ./public, it will result in conflicting keys. That's a edge case those and shouldn't happen.
Usually the files in the root dir are gulp generated files. We could share a good practice to generate those files in a specific directory ./build for instance, and never upload files from the root directory :)
Good call @philippemiguet, that will likely be another check we should add in a function like EnsureUniqueKeys that throws and error if there are duplicates.
Purpose
Inspired by the discussion in this PR, we can remove the shared directory prefix to allow for cleaner manifests and easier usage. This would make the
@bufferapp/static-assets
library simpler and custom solutions to be cleaner as well.Idea
Given a generated manifest:
It would become:
Since most apps are never referencing
./public
in their code, it makes sense to remove it, potentially by default. To do this we could:public
as a prefix directoryThe text was updated successfully, but these errors were encountered: