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/action-setup@v2.2.4
18+
with:
19+
version: latest
20+
run_install: true
21+
- name: Use Node.js 16.x
22+
uses: actions/setup-node@v3.4.1
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

0 commit comments

Comments
 (0)