mirror of
https://github.com/fregante/GhostText.git
synced 2024-09-11 19:47:22 +03:00
Meta: Add building/contributing documentation (#194)
This commit is contained in:
parent
29b3aecbbd
commit
0f4499bf1c
44
contributing.md
Normal file
44
contributing.md
Normal file
@ -0,0 +1,44 @@
|
||||
# Contributing
|
||||
|
||||
## Requirements
|
||||
|
||||
[Node.js](https://nodejs.org/en/download/) version 15 or later is required.
|
||||
|
||||
## Workflow
|
||||
|
||||
First clone:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/GhostText/GhostText
|
||||
cd GhostText
|
||||
npm install
|
||||
```
|
||||
|
||||
When working on the extension or checking out branches, use this to have it constantly build your changes:
|
||||
|
||||
```sh
|
||||
npm run watch # Listen to file changes and automatically rebuild
|
||||
```
|
||||
|
||||
Then load or reload it into the browser to see the changes.
|
||||
|
||||
## Loading into the browser
|
||||
|
||||
The built extension will be in the `distribution` folder.
|
||||
|
||||
- [Load it manually in Chrome](https://www.smashingmagazine.com/2017/04/browser-extension-edge-chrome-firefox-opera-brave-vivaldi/#google-chrome-opera-vivaldi)
|
||||
- [Load it manually in Firefox](https://www.smashingmagazine.com/2017/04/browser-extension-edge-chrome-firefox-opera-brave-vivaldi/#mozilla-firefox)
|
||||
|
||||
Or use [web-ext](https://github.com/mozilla/web-ext) to load it automatically and watch for updates:
|
||||
|
||||
```sh
|
||||
npm install -g web-ext
|
||||
```
|
||||
|
||||
```sh
|
||||
npx web-ext run --target=chromium # For Chrome
|
||||
```
|
||||
|
||||
```sh
|
||||
npx web-ext run # For Firefox
|
||||
```
|
@ -33,5 +33,13 @@
|
||||
"@parcel/transformer-webextension": "^2.0.0-nightly.2186",
|
||||
"parcel": "^2.0.0-nightly.562",
|
||||
"xo": "^0.37.1"
|
||||
},
|
||||
"webExt": {
|
||||
"sourceDir": "distribution",
|
||||
"run": {
|
||||
"startUrl": [
|
||||
"https://ghosttext.github.io/GhostText/demo/"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,40 +0,0 @@
|
||||
# <img src="https://raw.githubusercontent.com/GhostText/GhostText/master/promo/gt_banner.png" height="60" alt="GhostText">
|
||||
|
||||
[![Chrome version][badge-cws]][link-cws] [![Firefox version][badge-amo]][link-amo]
|
||||
|
||||
[badge-cws]: https://img.shields.io/chrome-web-store/v/godiecgffnchndlihlpaajjcplehddca.svg?label=for%20chrome
|
||||
[badge-amo]: https://img.shields.io/amo/v/ghosttext.svg?label=for%20firefox
|
||||
[link-cws]: https://chrome.google.com/webstore/detail/ghosttext/godiecgffnchndlihlpaajjcplehddca 'Version published on Chrome Web Store'
|
||||
[link-amo]: https://addons.mozilla.org/en-US/firefox/addon/ghosttext/ 'Version published on Mozilla Add-ons'
|
||||
|
||||
## Installation
|
||||
|
||||
Follow the [instructions on the main README.md](https://github.com/GhostText/GhostText/#installation)
|
||||
|
||||
## Installation of the development version
|
||||
|
||||
### Setup
|
||||
|
||||
Run this in the project root:
|
||||
|
||||
```sh
|
||||
npm install
|
||||
npm run build
|
||||
# or this:
|
||||
npm run watch
|
||||
```
|
||||
|
||||
### On Chrome
|
||||
|
||||
1. Clone **GhostText** on your computer with `git clone https://github.com/GhostText/GhostText.git`
|
||||
2. Visit `chrome://extensions/` in Chrome
|
||||
3. Enable the **Developer mode** in the upper-right corner
|
||||
4. Use the "Load unpacked extension…" button on the left
|
||||
5. Select the folder `distribution` inside your newly cloned project
|
||||
|
||||
### On Firefox
|
||||
|
||||
1. Clone **GhostText** on your computer with `git clone https://github.com/GhostText/GhostText.git`
|
||||
2. Visit `about:debugging#addons` in Firefox
|
||||
3. Click on **Load Temporary Add-on**
|
||||
4. Select the file `distribution/manifest.json` inside your newly cloned project
|
Loading…
Reference in New Issue
Block a user