-
Notifications
You must be signed in to change notification settings - Fork 2
docs: add build and installation instructions to README #1
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,56 @@ | ||
| # Polyscope Chrome Extension | ||
|
|
||
| A companion browser extension for Polyscope. | ||
| A companion browser extension for [Polyscope](https://polyscope.dev) — connect your preview tabs to workspaces and use in-page tools like the element picker. | ||
|
|
||
| ## Requirements | ||
|
|
||
| - [Node.js](https://nodejs.org) (v18 or later) | ||
| - npm | ||
|
|
||
| ## Building from Source | ||
|
|
||
| **1. Clone the repository:** | ||
|
|
||
| ```bash | ||
| git clone https://github.com/beyondcode/polyscope-chrome.git | ||
| cd polyscope-chrome | ||
| ``` | ||
|
|
||
| **2. Install root dependencies:** | ||
|
|
||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| **3. Install extension dependencies and build:** | ||
|
|
||
| ```bash | ||
| cd packages/chrome-extension | ||
| npm install | ||
| npm run build | ||
| ``` | ||
|
|
||
| The compiled extension will be output to `packages/chrome-extension/dist/`. | ||
|
|
||
| ### Available Scripts | ||
|
|
||
| From the `packages/chrome-extension` directory: | ||
|
|
||
| | Command | Description | | ||
| |---|---| | ||
| | `npm run build` | Production build | | ||
| | `npm run dev` | Build in watch mode (rebuilds on file changes) | | ||
| | `npm run typecheck` | Run TypeScript type checking without emitting files | | ||
| | `npm run package` | Build and create a `.zip` ready for the Chrome Web Store | | ||
|
|
||
| ## Installing in Chrome | ||
|
|
||
| 1. Open Chrome and navigate to `chrome://extensions` | ||
| 2. Enable **Developer mode** using the toggle in the top-right corner | ||
| 3. Click **Load unpacked** | ||
| 4. Select the `packages/chrome-extension/dist/` folder | ||
|
|
||
| The extension icon will appear in your Chrome toolbar. Click it to toggle in-page tools on or off. You can also activate the element picker with the keyboard shortcut `Alt+Shift+P`. | ||
|
Comment on lines
+50
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The install section currently stops at loading the unpacked extension and then says to click the toolbar icon, but the code does not expose the panel that way: Useful? React with 👍 / 👎. |
||
|
|
||
| ## License | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These commands install
@polyscope/sdkfrom npm, not from this checkout:packages/chrome-extension/package-lock.json:800-802pins the dependency to the publishedsdk-0.1.0.tgz, andpackages/chrome-extension/src/background/index.ts:8imports that package directly. In practice, someone following this new “Building from Source” section will get a bundle that ignores any local edits undersrc/sdk/, so it is easy to validate the wrong code after making source changes in this repo.Useful? React with 👍 / 👎.