Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
exhuma committed Jul 11, 2022
2 parents 9446263 + 11d24c3 commit 4206be9
Show file tree
Hide file tree
Showing 55 changed files with 2,461 additions and 826 deletions.
14 changes: 11 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@
ARG VARIANT="16-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
RUN apt update && \
DEBIAN_FRONTEND=noninteractive \
apt -y install \
libnotify-bin \
pandoc \
vim-nox \
python3 \
python3-pip \
python3-venv \
jq && \
pip3 install pre-commit

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
Expand Down
42 changes: 20 additions & 22 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.3/containers/javascript-node
{
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": {
"VARIANT": "16-bullseye"
}
},
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bash ./.devcontainer/init-container.bash",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": {
"VARIANT": "16-bullseye"
}
},
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": ["dbaeumer.vscode-eslint"],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bash ./.devcontainer/init-container.bash",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}
6 changes: 1 addition & 5 deletions .devcontainer/init-container.bash
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/bin/bash
set -xe
sudo apt update
sudo apt -y install \
libnotify-bin \
pandoc \
jq
npm clean-install
pre-commit install
6 changes: 0 additions & 6 deletions .devcontainer/init-dev.bash

This file was deleted.

4 changes: 4 additions & 0 deletions .devcontainer/init-personal.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -xe
curl https://raw.githubusercontent.com/exhuma/dotfiles/master/bootstrap_devcontainer.bash | bash -
npm config set sign-git-tag true
21 changes: 21 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ["prettier", "plugin:jsdoc/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["@typescript-eslint"],
rules: {
"no-console": "off",
"no-unused-vars": "warn",
"sort-imports": "error",
"no-unused-vars": "off",
"jsdoc/require-returns-type": "off",
"jsdoc/require-param-type": "off",
},
};
10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "16"
- run: sudo apt install pandoc
- run: npm clean-install
- run: npm run dist
- run: make dist
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: web-ext-artifacts/schmackhaft-*.zip
draft: false
files: |
dist/chrome-*.zip
dist/mozilla-*.zip
dist/schmackhaft-*.zip
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.7.1"
hooks:
- id: prettier

- repo: local
hooks:
- id: eslint
name: eslint
entry: ./node_modules/.bin/eslint
language: system
files: \.[jt]s$
types: [file]
args:
- "--fix"
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"runem.lit-plugin",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
}
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# 0.4

- Add possibility to *hide* links with certain tags. Tags are now "tri-state":
- Add possibility to _hide_ links with certain tags. Tags are now "tri-state":
neutral, inclusive and exclusive
- Fixed a bug causing configuration to be always reset to default
- Minor UI improvments

# 0.3

- Compatibility with "manifest-v3" making it usable in both Mozilla based
browsers *and* chromium based browsers
browsers _and_ chromium based browsers
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@ CURRENT_VERSION = $(shell jq -r .version package.json)
all: chrome mozilla
notify-send -u low -t 1000 Build done

mozilla: pages serviceworker bundled_docs
mozilla: pages bundled_docs
mkdir -p unpackaged/mozilla
cp -r build/pages/* unpackaged/mozilla/
sed -e 's/__version__/$(CURRENT_VERSION)/' \
manifest-mozilla.json > unpackaged/mozilla/manifest.json

chrome: pages serviceworker bundled_docs
chrome: pages bundled_docs
mkdir -p unpackaged/chrome/src/core
cp -r build/pages/* unpackaged/chrome/
cp \
build/serviceworker/service-worker.es.js \
build/serviceworker/service-worker.umd.js \
unpackaged/chrome/src/core
sed -e 's/__version__/$(CURRENT_VERSION)/' \
manifest-chrome.json > unpackaged/chrome/manifest.json

Expand All @@ -28,9 +24,6 @@ bundled_docs:
cp -r docs/screenshots unpackaged/chrome/pages/docs
cp -r docs/screenshots unpackaged/mozilla/pages/docs

serviceworker:
npm run build -- --config vite-serviceworker.config.js

pages:
npm run build -- --config vite-pages.config.js

Expand Down
Loading

0 comments on commit 4206be9

Please sign in to comment.