Skip to content

Remove shared directory by default or w/ flagΒ #15

Open
@djfarrelly

Description

@djfarrelly

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:

{
  "public/js/bundle.js": "https://static.buffer.com/my-app/public/js/bundle.123456789.js"
}

It would become:

{
  "js/bundle.js": "https://static.buffer.com/my-app/js/bundle.123456789.js"
}

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions