0.0.1 • Published 3 years ago
@jsmanifest/webextension v0.0.1
@jsmanifest/webextension
TODO: description
Usage
const webextension = require('@jsmanifest/webextension');
// TODO: DEMONSTRATE API
const webpackExtensionRefresher = require('webpack-extension-refresher');
// TODO: DEMONSTRATE API
- Register hooks
- Start up server + start listening on WebSocket
- After all assets finished optimizing
- Rebuild fresh asset files that were being used by background/content/extension page code
- Override previous assets, replacing each with a new
ConcatSource
with multipleRawSource
s
- Creating
RawSource
- Inject background/content/extension page/ code (should be importable by
raw-loader
)
- Inject background/content/extension page/ code (should be importable by
After all assets are emitted
- Determine if
background
,content
, or any of theextension pages
changed. Make note of these - Send all WebSocket
client
s a socket message for changed pages
{ type: 'RELOAD' }
- Determine if
Injected Code
- Retrieve injected
window
from content - Define functions for:
- content script
- background
- extension page(s)
- Retrieve injected
0.0.1
3 years ago