Skip to content

Commit

Permalink
feat: add minimal viable feature set (#1)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
frederikb authored Nov 24, 2023
1 parent 5512f2c commit f34941d
Show file tree
Hide file tree
Showing 29 changed files with 8,701 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@commitlint/config-conventional"
]
}
17 changes: 17 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Basic Setup
description: Install PNPM, Node, and dependencies
runs:
using: composite
steps:
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
shell: bash
run: pnpm install
30 changes: 30 additions & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Validate
on:
workflow_call:
pull_request:
types: [opened, synchronize, reopened]
branches: [ main ]
push:
branches:
- main

jobs:
validate:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm lint

build:
runs-on: ubuntu-22.04
strategy:
matrix:
browser:
- firefox
- chrome
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm install
- run: pnpm run build:${{ matrix.browser }}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm run lint
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
240 changes: 240 additions & 0 deletions docs/bookmarksync-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "bookmarksync",
"description": "Synchronize browser bookmarks from a GitHub repository",
"private": true,
"version": "0.9.0",
"license": "MIT",
"type": "module",
"scripts": {
"dev": "wxt",
"dev:firefox": "wxt -b firefox",
"build": "wxt build",
"build:firefox": "wxt build -b firefox",
"build:chrome": "wxt build -b chrome",
"zip": "wxt zip",
"zip:firefox": "wxt zip -b firefox",
"compile": "tsc --noEmit",
"lint": "concurrently \"npm:lint:*\"",
"lint-fix": "concurrently \"npm:lint:* -- --fix\"",
"lint:css": "stylelint src/**/*.css",
"lint:js": "xo",
"postinstall": "wxt prepare",
"prepare": "husky install"
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"xo": {
"envs": [
"browser",
"webextensions"
],
"rules": {
"unicorn/prefer-top-level-await": "off",
"n/file-extension-in-import": "off"
}
},
"stylelint": {
"rules": {
"function-whitespace-after": null,
"media-feature-range-operator-space-after": null,
"media-feature-range-operator-space-before": null
}
},
"devDependencies": {
"@commitlint/cli": "18.4.3",
"@commitlint/config-conventional": "18.4.3",
"concurrently": "^8.2.2",
"cz-conventional-changelog": "3.3.0",
"husky": "^8.0.3",
"stylelint": "^15.11.0",
"typescript": "^5.3.2",
"wxt": "^0.10.2",
"xo": "^0.56.0"
},
"dependencies": {
"@octokit/plugin-retry": "^6.0.1",
"@octokit/rest": "^20.0.2",
"@webext-core/job-scheduler": "^1.0.0",
"@webext-core/proxy-service": "^1.2.0",
"webext-base-css": "^1.4.4",
"webext-options-sync": "^4.2.1"
}
}
Loading

0 comments on commit f34941d

Please sign in to comment.