Skip to content

Commit 57b1df4

Browse files
committed
init
0 parents  commit 57b1df4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+9296
-0
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
insert_final_newline = true

.eslintrc.js

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
},
5+
extends: ['airbnb', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
6+
ignorePatterns: ['dist/*', 'plugins/*', 'tests/*', '/*.cjs', '/*.js', '/*.ts', '/**/*.test.ts', 'test/*'],
7+
parser: '@typescript-eslint/parser',
8+
parserOptions: {
9+
project: './tsconfig.json',
10+
tsconfigRootDir: './',
11+
},
12+
settings: {
13+
'import/resolver': {
14+
typescript: {
15+
project: './tsconfig.json',
16+
},
17+
},
18+
},
19+
plugins: ['@typescript-eslint', 'import', 'prettier'],
20+
rules: {
21+
'react/jsx-uses-react': 'off',
22+
'react/react-in-jsx-scope': 'off',
23+
'react/require-default-props': 'off',
24+
'react/destructuring-assignment': 'off',
25+
'no-underscore-dangle': 'off',
26+
'@typescript-eslint/no-explicit-any': 'off',
27+
'no-console': 'off',
28+
'@typescript-eslint/no-this-alias': 'off',
29+
'import/prefer-default-export': 'off',
30+
'@typescript-eslint/no-empty-function': 'off',
31+
'no-shadow': 'off',
32+
'@typescript-eslint/no-shadow': ['error'],
33+
'no-restricted-syntax': 'off',
34+
'import/no-unresolved': ['error', { ignore: ['^virtual:'] }],
35+
'consistent-return': 'off',
36+
'no-continue': 'off',
37+
'no-eval': 'off',
38+
'no-await-in-loop': 'off',
39+
'no-nested-ternary': 'off',
40+
'no-param-reassign': ['error', { props: false }],
41+
'prefer-destructuring': 'off',
42+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
43+
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.tsx', '.jsx'] }],
44+
'import/extensions': [
45+
'error',
46+
'ignorePackages',
47+
{
48+
ts: 'never',
49+
tsx: 'never',
50+
},
51+
],
52+
'import/order': [
53+
'error',
54+
{
55+
groups: ['builtin', 'external', 'internal', ['sibling', 'parent'], 'index', 'unknown'],
56+
'newlines-between': 'always',
57+
alphabetize: {
58+
order: 'asc',
59+
caseInsensitive: true,
60+
},
61+
},
62+
],
63+
'sort-imports': [
64+
'error',
65+
{
66+
ignoreCase: false,
67+
ignoreDeclarationSort: true,
68+
ignoreMemberSort: false,
69+
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
70+
allowSeparatedGroups: true,
71+
},
72+
],
73+
},
74+
};

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @movie-web/core

.github/CODE_OF_CONDUCT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please visit the [main document at primary repository](https://github.com/movie-web/movie-web/blob/dev/.github/CODE_OF_CONDUCT.md).

.github/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please visit the [main document at primary repository](https://github.com/movie-web/movie-web/blob/dev/.github/CONTRIBUTING.md).

.github/SECURITY.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
The latest version of movie-web is the only version that is supported, as it is the only version that is being actively developed.
6+
7+
## Reporting a Vulnerability
8+
9+
You can contact the movie-web maintainers to report a vulnerability:
10+
- Report the vulnerability in the [movie-web Discord server](https://movie-web.github.io/links/discord)

.github/pull_request_template.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This pull request resolves #XXX
2+
3+
- [ ] I have read and agreed to the [code of conduct](https://github.com/movie-web/movie-web/blob/dev/.github/CODE_OF_CONDUCT.md).
4+
- [ ] I have read and complied with the [contributing guidelines](https://github.com/movie-web/movie-web/blob/dev/.github/CONTRIBUTING.md).
5+
- [ ] What I'm implementing was assigned to me and is an [approved issue](https://github.com/movie-web/movie-web/issues?q=is%3Aopen+is%3Aissue+label%3Aapproved). For reference, please take a look at our [GitHub projects](https://github.com/movie-web/movie-web/projects).
6+
- [ ] I have tested all of my changes.

.github/workflows/deploying.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Deploying
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
name: Build
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- uses: pnpm/action-setup@v2
18+
with:
19+
version: 8
20+
21+
- name: Install Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
cache: 'pnpm'
26+
27+
- name: Install pnpm packages
28+
run: pnpm install
29+
30+
- name: Build chrome project
31+
run: pnpm run build
32+
33+
- name: Package for chrome
34+
run: pnpm run package
35+
36+
- name: Build firefox project
37+
run: pnpm run build:firefox
38+
39+
- name: Package for firefox
40+
run: pnpm run package:firefox
41+
42+
- name: Upload chrome package
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: chrome
46+
path: ./build/chrome-mv3-prod.zip
47+
48+
- name: Upload firefox package
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: firefox
52+
path: ./build/firefox-mv3-prod.zip
53+
54+
release:
55+
name: Release
56+
needs: build
57+
runs-on: ubuntu-latest
58+
59+
steps:
60+
- name: Checkout code
61+
uses: actions/checkout@v4
62+
63+
- name: Download Chrome artifact
64+
uses: actions/download-artifact@v4
65+
with:
66+
name: chrome
67+
path: ./chrome
68+
69+
- name: Download Firefox artifact
70+
uses: actions/download-artifact@v4
71+
with:
72+
name: firefox
73+
path: ./firefox
74+
75+
- name: Get version
76+
id: package-version
77+
uses: martinbeentjes/npm-get-version-action@main
78+
79+
- name: Create Release
80+
id: create_release
81+
uses: actions/create-release@v1
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84+
with:
85+
tag_name: ${{ steps.package-version.outputs.current-version }}
86+
release_name: Extension v${{ steps.package-version.outputs.current-version }}
87+
draft: false
88+
prerelease: false
89+
90+
- name: Upload Chrome release
91+
uses: actions/upload-release-asset@v1
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
with:
95+
upload_url: ${{ steps.create_release.outputs.upload_url }}
96+
asset_path: ./chrome/chrome-mv3-prod.zip
97+
asset_name: extension-mw.chrome.zip
98+
asset_content_type: application/zip
99+
100+
- name: Upload Firefox release
101+
uses: actions/upload-release-asset@v1
102+
env:
103+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104+
with:
105+
upload_url: ${{ steps.create_release.outputs.upload_url }}
106+
asset_path: ./firefox/firefox-mv3-prod.zip
107+
asset_name: extension-mw.firefox.xpi
108+
asset_content_type: application/x-xpinstall.xpi

.github/workflows/submit.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Submit to Web Store"
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Cache pnpm modules
11+
uses: actions/cache@v3
12+
with:
13+
path: ~/.pnpm-store
14+
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
15+
restore-keys: |
16+
${{ runner.os }}-
17+
- uses: pnpm/[email protected]
18+
with:
19+
version: latest
20+
run_install: true
21+
- name: Use Node.js 16.x
22+
uses: actions/[email protected]
23+
with:
24+
node-version: 16.x
25+
cache: "pnpm"
26+
- name: Build the extension
27+
run: pnpm build
28+
- name: Package the extension into a zip artifact
29+
run: pnpm package
30+
- name: Browser Platform Publish
31+
uses: PlasmoHQ/bpp@v3
32+
with:
33+
keys: ${{ secrets.SUBMIT_KEYS }}
34+
artifact: build/chrome-mv3-prod.zip

.github/workflows/tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Testing
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- dev
9+
10+
jobs:
11+
testing:
12+
name: Testing
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- uses: pnpm/action-setup@v2
20+
with:
21+
version: 8
22+
23+
- name: Install Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: "pnpm"
28+
29+
- name: Install packages
30+
run: pnpm install
31+
32+
- name: Run linting
33+
run: pnpm run lint

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
3+
4+
# dependencies
5+
/node_modules
6+
/.pnp
7+
.pnp.js
8+
9+
# testing
10+
/coverage
11+
12+
#cache
13+
.turbo
14+
15+
# misc
16+
.DS_Store
17+
*.pem
18+
19+
# debug
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
.pnpm-debug.log*
24+
25+
# local env files
26+
.env*
27+
28+
out/
29+
build/
30+
dist/
31+
32+
# plasmo - https://www.plasmo.com
33+
.plasmo
34+
35+
# bpp - http://bpp.browser.market/
36+
keys.json
37+
38+
# typescript
39+
.tsbuildinfo

.prettierrc.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @type {import('prettier').Options}
3+
*/
4+
export default {
5+
printWidth: 120,
6+
trailingComma: 'all',
7+
singleQuote: true,
8+
endOfLine: 'auto',
9+
};

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"editorconfig.editorconfig"
5+
]
6+
}

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
4+
"eslint.format.enable": true,
5+
"[json]": {
6+
"editor.defaultFormatter": "esbenp.prettier-vscode"
7+
},
8+
"[typescriptreact]": {
9+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
10+
}
11+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 movie-web
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# extension
2+
3+
Enhance your movie-web experience with just one click
4+
5+
## Running for development
6+
7+
We use pnpm with the latest version of NodeJS.
8+
9+
```sh
10+
pnpm i
11+
pnpm dev
12+
```

assets/active.png

5.07 KB
Loading

assets/icon.png

4.63 KB
Loading

assets/inactive.png

4.89 KB
Loading

0 commit comments

Comments
 (0)