Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify the hierarchy of files #64

Closed
ariasuni opened this issue Aug 20, 2021 · 6 comments · Fixed by #102
Closed

Specify the hierarchy of files #64

ariasuni opened this issue Aug 20, 2021 · 6 comments · Fixed by #102

Comments

@ariasuni
Copy link
Contributor

As far as I know, a WebExtensions is a hierarchy a files with:

  • As its root, a manifest.json
  • As its root also, an optional _locales directory
  • All other files referenced by the manifest or the APIs (e.g. in tabs.executeScript) must be in the root or in a subdirectory.

A note could be added that since several browsers distribute extensions as zip, the limitation of this compression format should be taken into account (no need to add more details).

Sounds simple enough to describe, if I didn’t forget anything.

@xeenon
Copy link
Collaborator

xeenon commented Sep 2, 2021

We should avoid many specifics about the distribution format, since that is out of scope in the charter, but alluding to any limitations might be fine.

@carlosjeurissen
Copy link
Contributor

carlosjeurissen commented Sep 2, 2021 via email

@dotproto
Copy link
Member

dotproto commented Sep 2, 2021

TODO: assign @oliverdunk to this issue once we figure out why we can't ;)

@dotproto dotproto assigned dotproto and unassigned dotproto Sep 2, 2021
@zombie zombie assigned zombie and unassigned zombie Sep 2, 2021
@dotproto
Copy link
Member

dotproto commented Sep 2, 2021

Another important (and possibly non-normative) note is that casing can lead to filename collisions in certain operating systems. This is occasionally a source of confusing bugs for extension developers. One practical (albeit boring) way to avoid these issues is to ensure that all paths and filenames are lowercase.

@dotproto
Copy link
Member

dotproto commented Sep 2, 2021

I was about to note that Chrome requires that background service workers are located in the extension's root, but it looks like we resolved that issue: https://crbug.com/1136582

@Jack-Works
Copy link

And any files starts with _ excludes _locales will be rejected by Chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants