Skip to content

Boilerplate setup to make a web-browser extension with Elm

Notifications You must be signed in to change notification settings

eXenon/elm-webextension-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Boilerplate setup to make a web-browser extension with Elm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages