Better HN
topnewbestaskshowjobs
Log inSign up

cezaraugustodev

154 karma · joined Jan 26, 2021 (5y ago) · 27 submissions

Submissions

comment 2y ago · link · parent

Safari and Firefox are next, feel free to subscribe to the issues below so you know when Extension.js supports them.

- Safari https://github.com/cezaraugusto/extension.js/issues/46 - Firefox https://github.com/cezaraugusto/extension.js/issues/5

comment 2y ago · link · parent

In your case, Extension.js can help by managing the configuration details that are usually overlooked in general web development.

After copying a few files from the Chrome extension documentation site, you'll need to manually enable "developer mode" in your browser and add these files. If you make changes to your code, seeing the updates live requires manually reloading the various contexts that a browser extension can influence. Additionally, if you want to test your extensions on multiple browsers, you must do this manually for each one.

If you plan to use package dependencies like TypeScript or a JavaScript framework, you'll either have to rely on an existing abstraction framework for extensions and learn new techniques, or create your own configuration using tools like webpack, Parcel, esbuild, or another code compiler. At this point, developing browser extensions can become complex and frustrating.

Extension.js simplifies this by automating the process of bundling an extension in a browser ready for development. It comes with auto-reload support for every context, including parts of the browser that are not HTML/CSS/JavaScript. It also has built-in support for code dependencies such as TypeScript and React, where a simple installation enables your extension to have support without any setup wizardry. And it runs on multiple browsers at once.

Hope that clarifies things, and I'm happy to answer more questions :)

comment 2y ago · link · parent

FYI There is a new issue to track progress and enable Safari support https://github.com/cezaraugusto/extension.js/issues/46

comment 2y ago · link · parent

Thanks for that!

comment 2y ago · link · parent

That's great! I'm glad you will give it a try

comment 2y ago · link · parent

That's interesting, what do you mean? An abstraction for the manifest apply dev defaults or instructions on how each major part should work?

comment 2y ago · link · parent

Thank you! The ecosystem for developing extensions could be so much better, hope we can help with that

comment 2y ago · link · parent

Haha, thanks! It’s not in the immediate plans, but meanwhile, I'm sure there are some good libraries on npm for that :)

comment 2y ago · link · parent

I'm glad to hear!

comment 2y ago · link · parent

Totally relate. Extension development should be fun, right? Hope Extension.js can help you with your next project!

comment 2y ago · link · parent

Extension.js can help you creating a new extension using React in no time:

npx extension create my-react-extension --template=react

But I guess it doesn't make it any easier to modify the behavior of fancy modern web sites :_(

comment 2y ago · link · parent

Great question!

The biggest difference, in my opinion, is that Plasmo is a framework, which means you have to learn its abstractions and rely on specific samples tailored for these abstractions to create new extensions. There are config files and specific rules to follow that are not necessarily related to browser extensions.

On the other hand, Extension.js allows developers to create extensions using the standard extension APIs and abstracts only the configuration files, without the need to learn the tooling specifics. This way, a sample from Chrome or MDN that works with a manifest file as the source of truth requires no refactoring to work with Extension.js, making it easier to get started and prototype new projects.

comment 2y ago · link · parent

Yes, the manifest.json is a required file for all extensions, and the package.json file provides necessary package metadata.

web-ext is excellent, but it seems there are no plans for the project to support more browsers than it currently does. On the other hand, Extension.js plans to support all major vendors.

Except for Firefox support, which is in progress, I believe Extension.js offers parity with all core functionalities of web-ext, but it goes further by providing built-in support for React and TypeScript. All you need to do is add the correct dependencies to get up and running.

Additionally, Extension.js provides comprehensive extension reload support, including changes to the manifest.json file and the service_worker background. This feature sets it apart from similar tools, including web-ext, which do not offer this capability.

comment 2y ago · link · parent

The plugin for Firefox is on the way, but any community support is highly appreciated.

comment 2y ago · link · parent

Thanks! Firefox support will come in the next update. Stay tuned! :)

comment 2y ago · link · parent

Haha glad to hear that

comment 2y ago · link · parent

No worries :) but Chrome and Edge are indeed different browsers. Support for Firefox and Safari is next.

comment 2y ago · link · parent

That's great feedback, thank you. Will consider the removal.

comment 2y ago · link · parent

Sure thing! There will be support for Firefox very soon

comment 2y ago · link · parent

HN has a character limitation for the post title and changing the word made the title fit just fine :)

comment 2y ago · link · parent

Thank you! I'm glad you liked the readme as well :D

comment 2y ago · link · parent

Thanks for the kind words!

comment 2y ago · link · parent

Thanks! I do plan to support all major browsers in the near future, including Safari :)

comment 2y ago · link · parent

Thanks a lot!

You can run your Mozilla Add-On on Chrome or Edge by adding a --polyfill flag, but for now you need to manually add the extension to Firefox. I do plan to support Firefox in the near future, but no browser runner available at the moment.

25.

Show HN: I made a CLI tool to create web extensions with no build configuration(github.com ↗)

381 points · by cezaraugustodev · 2y ago · 87 comments

26.

npx extension create my-extension – zero-config web extension development tool(github.com ↗)

1 points · by cezaraugustodev · 2y ago · discuss