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

WebExtensionTransformer: Beautify manifest.json #5860

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

fregante
Copy link
Contributor

↪️ Pull Request

manifest.json entry files are being "minified" by default, regardless of the --no-minify option. Given that these are small configuration files I think they could avoid being minified by default for the sake of readability. Also because they're downloaded only when the extension is updated.

💻 Examples

Before this PR:

// manifest.json
{"name":"Awesome Extension","version":"0.0.0","description":"An awesome new browser extension","homepage_url":"https://github.com/awesome-templates/browser-extension-template","manifest_version":2,"minimum_chrome_version":"74","applications":{"gecko":{"id":"awesome-extension@notlmn.github.io","strict_min_version":"67.0"}},"icons":{"128":"/icon.png"},"permissions":["storage"],"options_ui":{"chrome_style":true,"page":"/options.html"},"background":{"persistent":false,"scripts":["/__/node_modules/webextension-polyfill/dist/browser-polyfill.js","/background.js"]}}

After this PR:

// manifest.json
{
  "name": "Awesome Extension",
  "version": "0.0.0",
  "description": "An awesome new browser extension",
  "homepage_url": "https://github.com/awesome-templates/browser-extension-template",
  "manifest_version": 2,
  "minimum_chrome_version": "74",
// etc

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

This is a minimal change/proposal, I'm not sure I'd be able to add unit tests for this change, should they be required.

@height
Copy link

height bot commented Feb 17, 2021

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link
Member

@mischnic mischnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need a test for this.

@DeMoorJasper DeMoorJasper marked this pull request as ready for review February 17, 2021 09:31
@DeMoorJasper DeMoorJasper merged commit f28eaf6 into parcel-bundler:v2 Feb 17, 2021
@fregante fregante deleted the patch-1 branch February 17, 2021 13:26
@fregante
Copy link
Contributor Author

Woohoo, I’m a Parcel contributor! Heheh

Thank you for merging this ☺️

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 this pull request may close these issues.

None yet

3 participants