Skip to content

Commit

Permalink
Vue 3 (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
YurySolovyov authored Sep 19, 2023
1 parent bf770b5 commit 3d69501
Show file tree
Hide file tree
Showing 71 changed files with 2,628 additions and 11,109 deletions.
18 changes: 9 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"parserOptions": {
"ecmaVersion": 6
},
"rules": {
"indent": ["error", 2],
"quotes": ["error", "single"],
Expand All @@ -27,20 +24,23 @@
"space-before-blocks": ["error", "always"],
"keyword-spacing": ["error", { "before": true, "after": true }],
"linebreak-style": ["error", "unix"],
"eol-last": ["error", "always"],
"vue/max-attributes-per-line": ["off"],
"vue/attributes-order": ["off"],
"vue/order-in-components": ["off"],
"vue/html-indent": ["off"],
"vue/html-self-closing": ["off"],
"vue/multi-word-component-names": ["off"],
"vue/html-closing-bracket-newline": ["error", {
"singleline": "never",
"multiline": "never"
}],
"vue/require-prop-types": ["warn"]
},
"env": {
"browser": true,
"es6": true,
"jasmine": true
"es2021": true
},
"parserOptions": {
"ecmaVersion": 8,
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["vue"],
Expand All @@ -51,6 +51,6 @@
},
"extends": [
"eslint:recommended",
"plugin:vue/recommended"
"plugin:vue/strongly-recommended"
]
}
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build
on: [push]

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install packages
uses: borales/actions-yarn@v4
with:
cmd: install

- name: Build bundles
uses: borales/actions-yarn@v4
with:
cmd: build
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint
on: [push]

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install packages
uses: borales/actions-yarn@v4
with:
cmd: install

- name: Run ESLint
uses: borales/actions-yarn@v4
with:
cmd: lint
24 changes: 24 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Tests
on: [push]

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install packages
uses: borales/actions-yarn@v4
with:
cmd: install

- name: Run tests
uses: borales/actions-yarn@v4
with:
cmd: test
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
dist/
extension/*.zip
extension/
.eslintcache
.DS_Store
*.log
package-lock.json
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# FuzzyMark
[![Codeship CI status](https://img.shields.io/codeship/f9b6a2d0-6e81-0133-7d59-7273d488d42e.svg)](https://codeship.com/projects/115871)
[![Deps](https://david-dm.org/YurySolovyov/fuzzymark.svg)](https://david-dm.org/YurySolovyov/fuzzymark)

Chrome and Firefox extension for accessing bookmarks with fuzzy search.

Expand Down
37 changes: 37 additions & 0 deletions copy-ff.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import path from 'node:path';
import { cp, rm, readFile, writeFile } from 'node:fs/promises';

const dir = process.cwd();

const CHROME_DIR = path.resolve(dir, './extension/chrome');
const FIREFOX_DIR = path.resolve(dir, './extension/firefox');

const copy = async () => {
await rm(FIREFOX_DIR, { recursive: true, force: true });
await cp(CHROME_DIR, FIREFOX_DIR, { recursive: true });
};

const fixup = async () => {
// Chrome does not like extra browser_specific_settings prop
{
const manifestString = await readFile(path.join(CHROME_DIR, 'manifest.json'), 'utf-8');
const { browser_specific_settings: _drop, ...manifestUpdated } = JSON.parse(manifestString);

await writeFile(path.join(CHROME_DIR, 'manifest.json'), JSON.stringify(manifestUpdated, null, 2));
}

// Firefox can't do service workers in extensions, but can do background scripts
{
const manifestString = await readFile(path.join(FIREFOX_DIR, 'manifest.json'), 'utf-8');
const { background, ...manifestUpdated } = JSON.parse(manifestString);

manifestUpdated.background = {
scripts: [background.service_worker]
};

await writeFile(path.join(FIREFOX_DIR, 'manifest.json'), JSON.stringify(manifestUpdated, null, 2));
}
}

await copy();
await fixup();
47 changes: 0 additions & 47 deletions extension/manifest.json

This file was deleted.

13 changes: 0 additions & 13 deletions extension/static/index.html

This file was deleted.

38 changes: 0 additions & 38 deletions karma.conf.js

This file was deleted.

Loading

0 comments on commit 3d69501

Please sign in to comment.