Hacker News new | past | comments | ask | show | jobs | submit login

One of the things I found most lacking from the official chrome and FF documentation, is how to use NPM with your extension for dependencies and how to automatically build and release to both the FF store and chrome store.

There are a couple of issues that come up if you just plonk a package.json in your root folder, for example - now you the same information like extension name and version number duplicated across two files, the npm package.json and the webextension's manifest.json. Nevermind the fact that it's not obvious at all how to distribute the npm dependencies with the extension once you have them installed on your computer

On all of these issues, the best "tutorial" I've found is just looking at the structure of sindresorhus's "refined GitHub" repo. He and the contributors have totally nailed how to integrate npm, automate the build and manage the package.json files plus much much more, in a very readable way. I would definitely consider mirroring the rough structure of refined GitHub just for sanity reasons. Everything about it makes sense.

Here's a link to the refined GitHub repo --https://github.com/sindresorhus/refined-github

And if it helps here's a link to the extension I built using refined GitHub as a model -- https://github.com/spookyUnknownUser/laconic_hover I tried to implement the most minimally important features of the build and packaging system of refined GitHub in my project.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: