Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,4 @@ public

CLAUDE.local.md
.claude/
ipfs-quicklaunch-*.zip
56 changes: 48 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This extension is an experimental proof of concept. It's intended to demonstrate

## 🚀 Quick Start

To get started with the IPFS QuickLaunch browser extension, you need to build it from source. Follow these steps
To get started with the IPFS QuickLaunch browser extension, you need to build it from source. Follow these steps:

```bash
# Install dependencies
Expand All @@ -34,16 +34,50 @@ npm install
# Build the extension
npm run build

# Watch for changes during development
# Create a .zip for Chrome Web Store
npm run package
```

### Development Commands

```bash
# Run extension in Chrome for development
npm start

# Watch TypeScript files for changes
npm run watch

# Clean build directory
npm run clean
```

### Available npm Scripts

| Command | Description |
|---------|-------------|
| `npm run build` | Compiles TypeScript and copies assets to `dist/` directory |
| `npm run package` | Builds and creates a `.zip` file ready for Chrome Web Store submission |
| `npm start` | Builds and launches the extension in Chrome/Chromium for development |
| `npm run watch` | Watches TypeScript files and recompiles on changes |
| `npm run clean` | Removes the `dist/` build directory |
| `npm run sync-version` | Syncs version from `package.json` to `manifest.json` (runs automatically during build) |

### Installation in Chrome

1. Make sure to build the extension first using `npm run build`.
2. Open Chrome and navigate to `chrome://extensions`.
3. Enable Developer Mode by clicking the toggle switch next to Developer mode.
4. Click the Load unpacked button and select the `dist` in the extension directory.
#### For Development (automatic)
1. Run `npm start` to build and launch the extension in Chrome
2. The extension will be automatically loaded and reloaded when you make changes
3. Chrome will open with the extension pre-installed for testing

#### For Development (manual)
1. Run `npm run build` to compile the extension
2. Open Chrome and navigate to `chrome://extensions`
3. Enable Developer Mode by clicking the toggle switch
4. Click "Load unpacked" and select the `dist/` directory

#### For Chrome Web Store Publishing
1. Run `npm run package` to create `ipfs-quicklaunch-{version}.zip`
2. Upload the generated `.zip` file to [Chrome Web Store Developer Dashboard](https://chrome.google.com/webstore/developer/dashboard)



Expand Down Expand Up @@ -265,12 +299,18 @@ interface DNSLinkCacheEntry {
# Install dependencies
npm install

# Development with auto-rebuild
# Development - launches in Chrome with auto-reload
npm start

# Or watch TypeScript files for manual reload
npm run watch

# Production build
# Production build for testing
npm run build

# Create .zip for Chrome Web Store
npm run package

# Load dist/ folder in Chrome Developer Mode
chrome://extensions/ -> "Load unpacked"
```
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ipfs-quicklaunch",
"version": "1.1.1",
"version": "1.1.2",
"description": "IPFS launcher browser extension with local pet names, version management, and smart CID discovery",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/ipshipyard/ipfs-quicklaunch",
Expand All @@ -13,10 +13,13 @@
},
"main": "src/background.js",
"scripts": {
"build": "tsc && cp src/manifest.json dist/ && cp src/popup.html dist/ && cp -r src/icons dist/",
"sync-version": "node -e \"const fs=require('fs'); const pkg=require('./package.json'); const m=require('./src/manifest.json'); if(m.version!==pkg.version){m.version=pkg.version; fs.writeFileSync('src/manifest.json', JSON.stringify(m,null,2)+'\\n'); console.log('✓ Updated manifest.json version to '+pkg.version)}else{console.log('✓ Version already in sync: '+pkg.version)}\"",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intense... we can maybe move this into a separate script.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #6

"build": "npm run sync-version && tsc && cp src/manifest.json dist/ && cp src/popup.html dist/ && cp -r src/icons dist/",
"package": "npm run build && web-ext build --source-dir=dist --artifacts-dir=. --filename=ipfs-quicklaunch-{version}.zip --overwrite-dest",
"start": "npm run build && web-ext run --source-dir=dist --target=chromium",
"release": "aegir release",
"watch": "tsc --watch",
"clean": "rm -rf dist"
"clean": "rm -rf dist ipfs-quicklaunch-*.zip"
},
"files": [
"src",
Expand Down Expand Up @@ -134,7 +137,8 @@
"devDependencies": {
"@types/chrome": "^0.0.248",
"aegir": "^47.0.20",
"typescript": "^5.0.0"
"typescript": "^5.0.0",
"web-ext": "^8.3.0"
},
"keywords": [
"browser-extension",
Expand Down
13 changes: 9 additions & 4 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "IPFS QuickLaunch",
"version": "1.0.0",
"version": "1.1.2",
"description": "IPFS launcher browser extension with local pet names, version management, and smart CID discovery",
"permissions": [
"storage",
Expand All @@ -23,10 +23,15 @@
},
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*"],
"js": ["content.js"],
"matches": [
"http://*/*",
"https://*/*"
],
"js": [
"content.js"
],
"run_at": "document_end",
"all_frames": false
}
]
}
}
Loading