Skip to content

Commit 3efb92d

Browse files
committed
Publish extension to web store
1 parent 7c9a60b commit 3efb92d

File tree

5 files changed

+34
-9
lines changed

5 files changed

+34
-9
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ jobs:
2323

2424
- uses: actions/upload-artifact@v4
2525
with:
26-
name: react-executor-devtools-${{ github.ref_name }}
26+
name: build-${{ github.ref_name }}
2727
path: build
2828

29+
- name: Publish extension
30+
run:
31+
zip -r build build
32+
npx --yes chrome-webstore-upload-cli@3.1.0 upload --auto-publish --source build.zip
33+
2934
- name: Create release draft
3035
run: gh release create ${{ github.ref_name }} --generate-notes --draft
3136
env:

README.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,34 @@
22

33
Devtools browser extension for [React Executor](https://github.com/smikhalevski/react-executor).
44

5-
Install the extension from the Chrome Web Store and try it live with
5+
[Install the extension](https://chromewebstore.google.com/detail/react-executor-devtools/achlflelpafnlpepfpfhildkahbfhgjc)
6+
from the Chrome Web Store and try it live with
67
[the example project](https://codesandbox.io/p/sandbox/react-executor-example-ltflgy?file=%2Fsrc%2FTodoListApp.tsx).
78

89
<br/>
910

1011
<p align="center">
11-
<img alt="React Executor Devtools Screenshot" src="./assets/screenshot.png"/>
12+
<img alt="React Executor Devtools Screenshot" src="./assets/screenshot.png" width="640"/>
1213
</p>
1314

14-
## Running this extension
15+
## Running the extension locally
16+
17+
To build the extension locally and add it to the browser:
1518

1619
1. Clone this repository.
17-
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
18-
3. Navigate to a webpage and open the devtools window.
19-
4. Navigate to the new devtools panel named "Executors".
20+
2. Install dependencies and build sources:
21+
22+
```shell
23+
npm ci
24+
npm run build
25+
```
26+
27+
3. Load the created `./build` directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
28+
4. Navigate to a webpage and open the devtools window.
29+
5. Navigate to the new devtools panel named "Executors".
30+
31+
For development purposes, you can start the extension as a standalone app that uses a mocked data:
32+
33+
```shell
34+
npm start
35+
```

assets/screenshot.png

-3.91 KB
Loading

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
"module": "./index.mjs",
88
"types": "./index.d.ts",
99
"sideEffects": false,
10+
"config": {
11+
"manifest": "./src/main/static/manifest.json"
12+
},
1013
"scripts": {
1114
"build": "npm run build:icons && npm run build:panel && npm run build:devtools",
1215
"build:icons": "svgr src/main/app/icons",
1316
"build:panel": "vite build",
1417
"build:devtools": "cp -R src/main/static/ build/ && cp LICENSE.txt build/ && rollup --config",
1518
"start": "vite",
1619
"clean": "rimraf src/main/app/gen build coverage",
17-
"test": "jest"
20+
"test": "jest",
21+
"prepare-release": "prepare_release() { version=$(npm --no-git-tag-version version \"$@\") && node -e \"var manifest=require('$npm_package_config_manifest'); manifest.version='${version:1}'; require('fs').writeFileSync('$npm_package_config_manifest',JSON.stringify(manifest,null,2))\" && git add . && git commit -m ${version:1} && git tag $version; }; prepare_release"
1822
},
1923
"repository": {
2024
"type": "git",

src/main/static/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@
4040
"world": "MAIN"
4141
}
4242
]
43-
}
43+
}

0 commit comments

Comments
 (0)