Skip to content

Commit

Permalink
feat!: rewrite entire extension to TypeScript and add support for new…
Browse files Browse the repository at this point in the history
… GitHub API

Fixes #4 and #5
  • Loading branch information
giacomoferretti committed Oct 23, 2024
1 parent fa98326 commit 451f025
Show file tree
Hide file tree
Showing 29 changed files with 2,007 additions and 308 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: build

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
# - run: npm test
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.ignoreme
.build
.old
.build
node_modules/
dist/
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"json.schemas": [
{
"fileMatch": [
"/manifest.json"
],
"url": "http://json.schemastore.org/chrome-manifest"
}
]
}
Binary file removed icons/icon.128.png
Binary file not shown.
Binary file removed icons/icon.16.png
Binary file not shown.
Binary file removed icons/icon.32.png
Binary file not shown.
Binary file removed icons/icon.48.png
Binary file not shown.
Binary file removed icons/icon.64.png
Binary file not shown.
298 changes: 0 additions & 298 deletions js/main.js

This file was deleted.

9 changes: 5 additions & 4 deletions pack.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/usr/bin/env bash

VERSION="1.2.4-chrome"
VERSION="1.3.0-chrome"
ICONS_SIZES="16 32 48 64 128"
OUTPUT_FOLDER=".build"

# Prepare icons
for size in ${ICONS_SIZES}; do
(
cd icons || exit 1
cd public/icons || exit 1
inkscape -w "${size}" -h "${size}" source.svg --export-filename "icon.${size}.png"
)
done

# Pack to zip
mkdir "${OUTPUT_FOLDER}"
7z a "${OUTPUT_FOLDER}/${VERSION}.zip" -x!pack.sh -x!icons/source.svg -x!.git -x!.gitignore -x!.ignoreme -x!.github -x!"${OUTPUT_FOLDER}"
mkdir -p "${OUTPUT_FOLDER}"
(cd dist && zip -r "${VERSION}.zip" ./*)
mv dist/"${VERSION}.zip" "${OUTPUT_FOLDER}"
Loading

0 comments on commit 451f025

Please sign in to comment.