Skip to content

Commit f34941d

Browse files
authored
feat: add minimal viable feature set (#1)
Add options screen to configure all settings necessary to retrieve bookmark files from GitHub. Add popup action screen to manually trigger bookmark sync. Add background job that regularily triggers a bookmark sync. Add job that triggers a bookmark sync shortly after browser startup. Add bookmark sync logic against a GitHub repo. Add commit hook to ensure commit messages follow conventional commit style.
1 parent 5512f2c commit f34941d

29 files changed

+8701
-7
lines changed

.commitlintrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"@commitlint/config-conventional"
4+
]
5+
}

.github/actions/setup/action.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Basic Setup
2+
description: Install PNPM, Node, and dependencies
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Setup PNPM
7+
uses: pnpm/action-setup@v2
8+
with:
9+
version: 8
10+
- name: Setup NodeJS
11+
uses: actions/setup-node@v4
12+
with:
13+
node-version: 18
14+
cache: pnpm
15+
- name: Install Dependencies
16+
shell: bash
17+
run: pnpm install

.github/workflows/validate.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Validate
2+
on:
3+
workflow_call:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
branches: [ main ]
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
validate:
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: ./.github/actions/setup
17+
- run: pnpm lint
18+
19+
build:
20+
runs-on: ubuntu-22.04
21+
strategy:
22+
matrix:
23+
browser:
24+
- firefox
25+
- chrome
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: ./.github/actions/setup
29+
- run: pnpm install
30+
- run: pnpm run build:${{ matrix.browser }}

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx --no -- commitlint --edit "$1"

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
pnpm run lint

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
shamefully-hoist=true

docs/bookmarksync-icon.svg

Lines changed: 240 additions & 0 deletions
Loading

package.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"name": "bookmarksync",
3+
"description": "Synchronize browser bookmarks from a GitHub repository",
4+
"private": true,
5+
"version": "0.9.0",
6+
"license": "MIT",
7+
"type": "module",
8+
"scripts": {
9+
"dev": "wxt",
10+
"dev:firefox": "wxt -b firefox",
11+
"build": "wxt build",
12+
"build:firefox": "wxt build -b firefox",
13+
"build:chrome": "wxt build -b chrome",
14+
"zip": "wxt zip",
15+
"zip:firefox": "wxt zip -b firefox",
16+
"compile": "tsc --noEmit",
17+
"lint": "concurrently \"npm:lint:*\"",
18+
"lint-fix": "concurrently \"npm:lint:* -- --fix\"",
19+
"lint:css": "stylelint src/**/*.css",
20+
"lint:js": "xo",
21+
"postinstall": "wxt prepare",
22+
"prepare": "husky install"
23+
},
24+
"config": {
25+
"commitizen": {
26+
"path": "cz-conventional-changelog"
27+
}
28+
},
29+
"xo": {
30+
"envs": [
31+
"browser",
32+
"webextensions"
33+
],
34+
"rules": {
35+
"unicorn/prefer-top-level-await": "off",
36+
"n/file-extension-in-import": "off"
37+
}
38+
},
39+
"stylelint": {
40+
"rules": {
41+
"function-whitespace-after": null,
42+
"media-feature-range-operator-space-after": null,
43+
"media-feature-range-operator-space-before": null
44+
}
45+
},
46+
"devDependencies": {
47+
"@commitlint/cli": "18.4.3",
48+
"@commitlint/config-conventional": "18.4.3",
49+
"concurrently": "^8.2.2",
50+
"cz-conventional-changelog": "3.3.0",
51+
"husky": "^8.0.3",
52+
"stylelint": "^15.11.0",
53+
"typescript": "^5.3.2",
54+
"wxt": "^0.10.2",
55+
"xo": "^0.56.0"
56+
},
57+
"dependencies": {
58+
"@octokit/plugin-retry": "^6.0.1",
59+
"@octokit/rest": "^20.0.2",
60+
"@webext-core/job-scheduler": "^1.0.0",
61+
"@webext-core/proxy-service": "^1.2.0",
62+
"webext-base-css": "^1.4.4",
63+
"webext-options-sync": "^4.2.1"
64+
}
65+
}

0 commit comments

Comments
 (0)