Skip to content

Commit b373765

Browse files
authored
fix: remove @podium/dev-tool and extension feature (#158)
1 parent 1f7eea5 commit b373765

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+5974
-11723
lines changed

.github/workflows/pull-request.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ on:
1414

1515
jobs:
1616
run-all-tests:
17-
strategy:
18-
matrix:
19-
os: [ubuntu-latest, windows-latest]
20-
node-version: [18, 20]
21-
runs-on: ${{ matrix.os }}
17+
runs-on: ubuntu-latest
2218

2319
steps:
2420
- name: Checkout
@@ -27,7 +23,7 @@ jobs:
2723
- name: Install Node.js
2824
uses: actions/setup-node@v4
2925
with:
30-
node-version: ${{ matrix.node-version }}
26+
node-version: 22
3127

3228
- name: Install dependencies
3329
run: npm install
@@ -37,9 +33,3 @@ jobs:
3733

3834
- name: Build
3935
run: npm run build
40-
41-
- name: Run all tests
42-
run: npm test
43-
44-
- name: Generate and check types
45-
run: npm run types

.github/workflows/release.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ jobs:
2323
release:
2424
name: Release
2525
runs-on: ubuntu-latest
26+
2627
steps:
2728
- name: Checkout
2829
uses: actions/checkout@v4
2930

3031
- name: Install Node.js
3132
uses: actions/setup-node@v4
3233
with:
33-
node-version: 20
34+
node-version: 22
3435

3536
- name: Install dependencies
3637
run: npm install
@@ -41,14 +42,8 @@ jobs:
4142
- name: Build
4243
run: npm run build
4344

44-
- name: Test
45-
run: npm run test
46-
47-
- name: Generate and check types
48-
run: npm run types
49-
5045
- name: Release and publish
51-
run: npx multi-semantic-release
46+
run: npx semantic-release
5247
env:
5348
FIREFOX_API_KEY: ${{ secrets.FIREFOX_API_KEY }}
5449
FIREFOX_SECRET_KEY: ${{ secrets.FIREFOX_SECRET_KEY }}

.gitignore

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
/dist
14+
15+
# misc
116
.DS_Store
2-
.idea
3-
node_modules
17+
.env.local
18+
.env.development.local
19+
.env.test.local
20+
.env.production.local
21+
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*

.multi-releaserc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

CONTRIBUTING.md

Lines changed: 58 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,71 @@
11
# Contributing
22

3-
Welcome, and thanks for showing an interest in contributing 💜
3+
Thank you for showing an interest in contributing 💜
44

5-
This module is an `npm` [workspace]. You will need:
5+
The goal of this browser extension is to help developers of [Podium applications](https://podium-lib.io/) test and debug their apps.
66

7-
- Node latest LTS
8-
- `npm`
7+
The extension targets [WebExtension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions) Manifest V3 for [cross-browser support](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Build_a_cross_browser_extension).
98

10-
See also [the browser extension's CONTRIBUTING.md](packages/client/CONTRIBUTING.md) since the workflow there is different.
9+
If you're new to extension development, a great place to start is Mozilla's [WebExtension workshop](https://extensionworkshop.com/). Some other documentation for extension authors that may be helpful:
1110

12-
## 🧞 Commands
11+
- [MDN - Build a cross-browser extension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Build_a_cross_browser_extension)
12+
- [Chrome - Your first extension](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world)
13+
- [MDN - Your first extension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension)
14+
- [Chrome - Extend DevTools](https://developer.chrome.com/docs/extensions/how-to/devtools/extend-devtools)
1315

14-
All commands are run from the root of the project, from a terminal:
16+
## Building
1517

16-
| Command | Action |
17-
| -------------------------------- | ------------------------------------------------------------------------------- |
18-
| `npm install --legacy-peer-deps` | Installs dependencies across the workspace |
19-
| `npm test` | Runs unit tests across the workspace |
20-
| `npm run lint` | Does a check with [ESLint](./.eslintrc) across the workspace |
21-
| `npm run types` | Generates type definitions from JSDoc and does a typecheck across the workspace |
18+
To build the extension:
2219

23-
To only run the command for an individual package, either:
20+
```
21+
npm install --legacy-peer-deps
22+
npm run build
23+
```
24+
25+
The packaged extension is built to `dist/`.
26+
27+
## Testing
28+
29+
We use [`web-ext`](https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/) to get a quick and simple development environment in Chrome and Firefox.
30+
31+
1. Run `npm install`
32+
2. Run `npm start`
33+
34+
Chrome will open automatically.
35+
36+
- In the browser window, go to a test application (for instance start [server/example](../server/example/)) and open the devtools to reveal the Podium panel.
37+
- Right click inside the panel and Inspect to open the "devtools for the devtool".
38+
39+
To test in Firefox, run `npm run start:firefox`.
40+
41+
### Manual testing
42+
43+
The process is similar across browsers. Also note that some changes may require a reinstall or a refresh inside the browser settings.
44+
45+
- [Chrome: Reload the extension](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#reload)
46+
- [Firefox: Testing](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#testing)
47+
48+
#### Firefox
49+
50+
- Open [about:debugging](about:debugging#/runtime/this-firefox) and click This Firefox
51+
- Click Load Temporary Add-on
52+
- Select `build/manifest.json`
53+
54+
You'll have to [repeat the steps](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#installing) the next time you start Firefox, and hit the refresh button when you rebuild the extension.
55+
56+
NB: you may have to give the Podium extension permission to run. Look for a dot on the extension and consider allowing it to always run on the domain you're working on.
57+
58+
#### Chrome
59+
60+
The approach should be similar in Chromium-based browsers.
61+
62+
- Open [chrome://extensions/](chrome://extensions/)
63+
- Toggle Developer mode on in the top-right if it's not on already.
64+
- Click Load unpacked
65+
- Select the `build/` directory
66+
67+
The extension should now be installed and ready for testing. You may have to [hit the refresh button when you rebuild](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#reload) the extension.
2468

25-
- Run the command from the package folder
26-
- Append ` --workspace=<package name>` to the command
2769

2870
## 🚚 Continuous deployment
2971

File renamed without changes.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Podium dev tools
1+
# Podium Developer Tools
22

3-
## 📦 Packages
3+
This browser extension helps you test and debug your [Podium applications](https://podium-lib.io/).
44

5-
This is an npm workspace containing:
5+
To get started, download the extension:
66

7-
- A [browser extension](packages/client/) for developers of Podium applications
8-
- [@podium/dev-tool](packages/server/), a module that adds APIs to your podlet needed by the browser extension
7+
- Chrome web store
8+
- Firefox Add-ons
99

1010
## 🧑‍💻 Development
1111

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import config from '@podium/eslint-config';
1+
import config from "@podium/eslint-config";
22

33
export default config;

0 commit comments

Comments
 (0)