Skip to content

Commit 4b87baa

Browse files
authored
Update Build and Dependencies (#76)
* Update Build and Dependencies * Reset Manifest Version * Update README.md
1 parent 3a8c446 commit 4b87baa

5 files changed

Lines changed: 1717 additions & 1134 deletions

File tree

.github/workflows/build.yaml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,24 @@ jobs:
1313

1414
steps:
1515
- name: "Checkout"
16-
uses: actions/checkout@v3
17-
18-
- name: "Release Version Check"
19-
if: ${{ github.event_name == 'release' }}
20-
run: |
21-
export version="$(jq '.version' < manifest.json | tr -d '"')"
22-
if [ "${{ github.ref_name }}" != "${version}" ];then
23-
echo "Manifest Version ${version} does not match release tag ${{ github.ref_name }}"
24-
exit 1
25-
fi
16+
uses: actions/checkout@v4
2617

2718
- name: "Setup Node"
28-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
2920
with:
30-
node-version: 18
21+
node-version: 20
22+
23+
- name: "Update Manifest Version"
24+
uses: cssnr/update-json-value-action@v1
25+
if: ${{ github.event_name == 'release' }}
3126

3227
- name: "Build All"
3328
run: |
3429
npm install
3530
npm run build
3631
3732
- name: "Upload to Actions"
38-
uses: actions/upload-artifact@v3
33+
uses: actions/upload-artifact@v4
3934
with:
4035
name: artifacts
4136
path: web-ext-artifacts/

README.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
[![Chrome Web Store Version](https://img.shields.io/chrome-web-store/v/ifefifghpkllfibejafbakmflidjcjfp?label=chrome&logo=googlechrome)](https://chromewebstore.google.com/detail/link-extractor/ifefifghpkllfibejafbakmflidjcjfp)
66
[![Mozilla Add-on Version](https://img.shields.io/amo/v/link-extractor?label=firefox&logo=firefox)](https://addons.mozilla.org/addon/link-extractor)
77
[![GitHub Release Version](https://img.shields.io/github/v/release/cssnr/link-extractor?logo=github)](https://github.com/cssnr/link-extractor/releases/latest)
8-
[![Manifest Version](https://img.shields.io/github/manifest-json/v/cssnr/link-extractor?filename=manifest.json&logo=json&label=manifest)](https://github.com/cssnr/link-extractor/blob/master/manifest.json)
98
[![Build](https://github.com/cssnr/link-extractor/actions/workflows/build.yaml/badge.svg)](https://github.com/cssnr/link-extractor/actions/workflows/build.yaml)
109
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_link-extractor&metric=alert_status&label=quality)](https://sonarcloud.io/summary/overall?id=cssnr_link-extractor)
1110
# Link Extractor
@@ -86,22 +85,31 @@ For more information on regex, see: https://regex101.com/
8685

8786
**Quick Start**
8887

89-
To install and run chrome or firefox with web-ext.
88+
First, clone (or download) this repository and change into the directory.
89+
90+
Second, install the dependencies:
91+
```shell
92+
npm install
93+
```
94+
95+
Finally, to run Chrome or Firefox with web-ext, run one of the following:
9096
```shell
91-
npm isntall
9297
npm run chrome
9398
npm run firefox
9499
```
95100

96-
To Load Unpacked/Temporary Add-on make a `manifest.json` and run from the [src](src) folder.
101+
Additionally, to Load Unpacked/Temporary Add-on make a `manifest.json` and run from the [src](src) folder, run one of the following:
97102
```shell
98103
npm run manifest:chrome
99104
npm run manifest:firefox
100105
```
101106

107+
Chrome: [https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked)
108+
Firefox: [https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/)
109+
102110
For more information on web-ext, [read this documentation](https://extensionworkshop.com/documentation/develop/web-ext-command-reference/).
103111
To pass additional arguments to an `npm run` command, use `--`.
104-
Example: `npm run chrome -- --chromium-binary=...`
112+
Example: `npm run chrome -- --chromium-binary=...`
105113

106114
## Building
107115

@@ -111,25 +119,17 @@ See [gulpfile.js](gulpfile.js) for more information on `postinstall`.
111119
npm install
112120
```
113121

114-
To load unpacked or temporary addon from the [src](src) folder, you must generate the `src/manifest.json` for the desired browser.
115-
```shell
116-
npm run manifest:chrome
117-
npm run manifest:firefox
118-
```
119-
120-
If you would like to create a `.zip` archive of the [src](src) directory for the desired browser.
122+
To create a `.zip` archive of the [src](src) directory for the desired browser run one of the following:
121123
```shell
122124
npm run build
123125
npm run build:chrome
124126
npm run build:firefox
125127
```
126128

127-
For more information on building, see the scripts in the [package.json](package.json) file.
129+
For more information on building, see the scripts section in the [package.json](package.json) file.
128130

129131
## Chrome Setup
130132

131-
To install for production: https://chromewebstore.google.com/detail/link-extractor/ifefifghpkllfibejafbakmflidjcjfp
132-
133133
1. Build or Download a [Release](https://github.com/cssnr/link-extractor/releases).
134134
1. Unzip the archive, place the folder where it must remain and note its location for later.
135135
1. Open Chrome, click the `3 dots` in the top right, click `Extensions`, click `Manage Extensions`.
@@ -138,18 +138,14 @@ To install for production: https://chromewebstore.google.com/detail/link-extract
138138

139139
## Firefox Setup
140140

141-
To install for production: https://addons.mozilla.org/addon/link-extractor
142-
143-
Note: Firefox Temporary addon's will **not** remain after restarting Firefox, therefore;
144-
it is very useful to keep addon storage after uninstall/restart with `keepStorageOnUninstall`.
145-
146141
1. Build or Download a [Release](https://github.com/cssnr/link-extractor/releases).
147142
1. Unzip the archive, place the folder where it must remain and note its location for later.
148143
1. Go to `about:debugging#/runtime/this-firefox` and click `Load Temporary Add-on...`
149144
1. Navigate to the folder you extracted earlier, select `manifest.json` then click `Select File`.
150-
1. Open `about:config` search for `extensions.webextensions.keepStorageOnUninstall` and set to `true`.
145+
1. Optional: open `about:config` search for `extensions.webextensions.keepStorageOnUninstall` and set to `true`.
151146

152147
If you need to test a restart, you must pack the addon. This only works in ESR, Development, or Nightly.
148+
You may also use an Unbranded Build: [https://wiki.mozilla.org/Add-ons/Extension_Signing#Unbranded_Builds](https://wiki.mozilla.org/Add-ons/Extension_Signing#Unbranded_Builds)
153149

154150
1. Run `npm run build:firefox` then use `web-ext-artifacts/{name}-firefox-{version}.zip`.
155151
1. Open `about:config` search for `xpinstall.signatures.required` and set to `false`.

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Easily extract, parse, or open all links/domains from a site or text with optional filters.",
44
"homepage_url": "https://link-extractor.cssnr.com/",
55
"author": "Shane",
6-
"version": "0.6.1",
6+
"version": "0.0.1",
77
"manifest_version": 3,
88
"commands": {
99
"_execute_action": {

0 commit comments

Comments
 (0)