Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/exenon/elm-webextension-boilerplate
Boilerplate setup to make a web-browser extension with Elm
https://github.com/exenon/elm-webextension-boilerplate
boilerplate elm webextension webextensions
Last synced: 16 days ago
JSON representation
Boilerplate setup to make a web-browser extension with Elm
- Host: GitHub
- URL: https://github.com/exenon/elm-webextension-boilerplate
- Owner: eXenon
- Created: 2021-01-03T18:26:25.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-03T18:34:09.000Z (about 4 years ago)
- Last Synced: 2024-11-06T21:46:57.600Z (2 months ago)
- Topics: boilerplate, elm, webextension, webextensions
- Language: JavaScript
- Homepage:
- Size: 122 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Elm Boilerplate for WebExtension
This repo contains a basic boilerplate to develop extensions for Firefox
and Google Chrome using Elm. It relies on `webextension-polyfill` to ensure cross-browser compatibility.## Development
Run `npm-watch` to watch the elm directory for changes and compile the code.
Run `web-ext run` to start a Firefox instance with your extension installed.
Refer to the MDN documentation for further docs on `web-ext`.## Files
```
src/
├── manifest.json
├── elm/
│ ├── Background.elm : Elm app of the background script
│ ├── Popup.elm : Elm app of the browser action
│
│
├── elm-background-loader.js : load Elm code into background script
├── background.html : entry point for the background script
├── popup/
│ ├── index.html : entry point for the popup
│ ├── elm-popup-loader.js : load Elm into the popup HTML
```## FAQ
Q : How do I add a page action ?
A : A page action should be pretty similar to the background script.
Q : Does this work with Elm version ?
A : Yes, just re-create the elm apps with whatever version you need.