Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace grunt with web-ext #37

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ jspm_packages
.node_repl_history

.DS_Store
dist
package
web-ext-profile
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
=========

### unreleased
- replace [`grunt`](https://gruntjs.com) with [`web-ext`](https://extensionworkshop.com)

### v1.7.2 / 2020-10-30

- Fix contribution graph and progress bar colors (new GitHub CSS variables)
Expand Down
52 changes: 19 additions & 33 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,40 @@ Setup
npm i
```

Test
----

```bash
npm t
```
Run
---

Build
-----
Chrome:

```bash
npm run build
npm run -- serve:chromium
```

or
This will open a new chromium browser window with a temporary profile
and the web extension already loaded.

Firefox:

```bash
npm run serve
npm run -- serve:firefox
```

to update source continuously.
This will open a new firefox browser window with a temporary profile
and the web extension already loaded.

Run
---

Chrome:

1. Open Tools -> Extensions
2. Check the "Developer Mode" option (if not already)
3. Select "Load unpacked extension"
4. Navigate to the project `github-contribution-color-graph/dist/chrome` and click select

Firefox:

1. Open Tools -> Add-ons
2. Click "Debug Add-ons"
3. Check the "Enable add-on debugging" option (if not already)
4. Select "Load Temporary Add-on"
5. Navigate to the project `github-contribution-color-graph/dist/firefox` and click open

Opera:

1. View -> Show Extensions
2. Click on "Developer Mode" button (if not already)
3. Click on "Load Unpacked Extension..."
4. Navigate to the project `github-contribution-color-graph/dist/chrome` and click select
4. Navigate to the project `github-contribution-color-graph/src` and click select

Edge Chromium:

1. `...` -> Extensions
2. Click on "Developer Mode" button (if not already)
3. Click on "Load Unpacked"
4. Navigate to the project `github-contribution-color-graph/dist/chrome` and click select
4. Navigate to the project `github-contribution-color-graph/src` and click select

Package
-------
Expand All @@ -74,6 +55,11 @@ Package
npm run package
```

Note : The `package` script is maintained for backward-compatibility.
The web extension can now be packaged with the built-in `npm pack`
command which generates a neat tarball with the required files. Usage
of the `npm pack` command is encouraged over `npm run -- package`.

License
-------

Expand Down
18 changes: 0 additions & 18 deletions grunt/aliases.yml

This file was deleted.

28 changes: 0 additions & 28 deletions grunt/compress.js

This file was deleted.

35 changes: 0 additions & 35 deletions grunt/copy.js

This file was deleted.

8 changes: 0 additions & 8 deletions grunt/eslint.js

This file was deleted.

14 changes: 0 additions & 14 deletions grunt/watch.js

This file was deleted.

5 changes: 0 additions & 5 deletions gruntfile.js

This file was deleted.

28 changes: 18 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,31 @@
"engines": {
"node": ">=10"
},
"files": [ "src" ],
"scripts": {
"build": "grunt build",
"package": "grunt package",
"serve": "grunt serve",
"test": "grunt test"
"package": "npm pack",
"serve:firefox": "web-ext run --target firefox-desktop",
"serve:chromium": "web-ext run --target chromium",
"lint": "eslint src"
},
"devDependencies": {
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"grunt": "^1.1.0",
"grunt-contrib-compress": "^1.6.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-watch": "^1.1.0",
"load-grunt-config": "^3.0.1",
"grunt-eslint": "^23.0.0"
"web-ext": "^6.0.0"
},
"webExt": {
"sourceDir": "src",
"run": {
"profileCreateIfMissing": true,
"keepProfileChanges": true,
"firefoxProfile": "./web-ext-profile/firefox",
"chromiumProfile": "./web-ext-profile/chromium",
"startUrl": [
"github.com/williambelle"
]
}
}
}
32 changes: 0 additions & 32 deletions src/manifest.firefox.json

This file was deleted.

7 changes: 7 additions & 0 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
"manifest_version": 2,
"version": "1.7.2",

"applications": {
"gecko": {
"strict_min_version": "57.0",
"id": "[email protected]"
}
},

"content_scripts": [{
"js": [ "js/contentscript.js" ],
"matches": [ "https://github.com/*" ],
Expand Down