Skip to content

Commit aa6a66f

Browse files
committed
new version
0 parents  commit aa6a66f

23 files changed

+5394
-0
lines changed

.env.local

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PLASMO_PUBLIC_GTAG_ID=G-BCMP5DXSLX

.fleet/run.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"configurations": [
3+
4+
]
5+
}

.github/workflows/submit.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: "Release version"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'Release version'
7+
required: true
8+
push:
9+
tags:
10+
- 'v*.*'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Set LD_VERSION
17+
if: ${{ github.event_name == 'push'}}
18+
run: echo "LD_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
19+
- name: Set LD_VERSION
20+
if: ${{ github.event_name == 'workflow_dispatch'}}
21+
run: echo "LD_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
22+
23+
- uses: actions/checkout@v3
24+
- name: Cache pnpm modules
25+
uses: actions/cache@v3
26+
with:
27+
path: ~/.pnpm-store
28+
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
29+
restore-keys: |
30+
${{ runner.os }}-
31+
- uses: pnpm/[email protected]
32+
with:
33+
version: 7.11.0
34+
run_install: true
35+
- name: Use Node.js 16.x
36+
uses: actions/[email protected]
37+
with:
38+
node-version: 16.x
39+
cache: "pnpm"
40+
- name: Build and zip extension artifact
41+
run: |
42+
pnpm build -- --zip
43+
pnpm build --target=firefox-mv2 --zip
44+
45+
- name: Create Release
46+
id: create_release
47+
uses: actions/create-release@v1
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
with:
51+
tag_name: v${{ env.LD_VERSION }}
52+
release_name: v${{ env.LD_VERSION }}
53+
draft: true
54+
prerelease: false
55+
56+
- name: Upload Chrome Release Asset
57+
id: upload-chrome-release-asset
58+
uses: actions/upload-release-asset@v1
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
with:
62+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
63+
asset_path: ./build/chrome-mv3-prod.zip
64+
asset_name: leetcode-editor-extension-chrome-${{ env.LD_VERSION }}.zip
65+
asset_content_type: application/zip
66+
67+
- name: Upload Firefox Release Asset
68+
id: upload-firefox-release-asset
69+
uses: actions/upload-release-asset@v1
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
with:
73+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
74+
asset_path: ./build/firefox-mv2-prod.zip
75+
asset_name: leetcode-editor-extension-firefox-${{ env.LD_VERSION }}.zip
76+
asset_content_type: application/zip
77+
78+
# - name: Browser Platform Publish
79+
# uses: PlasmoHQ/bpp@v2
80+
# with:
81+
# keys: ${{ secrets.SUBMIT_KEYS }}
82+
# artifact: build/chrome-mv3-prod.zip

.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

.lessrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"javascriptEnabled": true
3+
}

.prettierrc.cjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @type {import('prettier').Options}
3+
*/
4+
module.exports = {
5+
printWidth: 80,
6+
tabWidth: 2,
7+
useTabs: false,
8+
semi: false,
9+
singleQuote: false,
10+
trailingComma: "none",
11+
bracketSpacing: true,
12+
bracketSameLine: true,
13+
plugins: [require.resolve("@plasmohq/prettier-plugin-sort-imports")],
14+
importOrder: ["^@plasmohq/(.*)$", "^~(.*)$", "^[./]"],
15+
importOrderSeparation: true,
16+
importOrderSortSpecifiers: true
17+
}

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Leetcode Editoe Extension
2+
3+
- [English Document](#Installation)
4+
- [中文文档](README_ZH.md)
5+
6+
The Chrmoe plug-in for [Leetcode Editor](https://github.com/shuzijun/leetcode-editor) provides jumping from Leetcode web pages to the IDE editor.
7+
8+
## Installation
9+
10+
1. Install from the Chrome Store
11+
2. Download the file to install
12+
13+
## How to use
14+
15+
1. The [Jetbrains Toolbox App](https://www.jetbrains.com/toolbox-app/) must be installed, and jumping to the IDE from the browser needs to rely on the protocol provided by this application.
16+
2. Install the [Leetcode Editor](https://github.com/shuzijun/leetcode-editor) plugin.
17+
3. Install this plugin and configure it on the selection page.
18+
4. Open the leetcode web page and click the icon to open the editor.
19+
![page](doc/page.png)
20+
21+
## develop
22+
23+
This plugin uses [plasmo](https://github.com/PlasmoHQ/plasmo), please refer to plasmo for related development methods

README_ZH.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Leetcode Editoe Extension
2+
3+
- [English Document](README.md)
4+
- [中文文档](#安装方式)
5+
6+
[Leetcode Editor](https://github.com/shuzijun/leetcode-editor)的Chrmoe插件,提供从力扣网页上跳转到IDE编辑器。
7+
8+
## 安装方式
9+
10+
1. 从Chrome商店安装
11+
2. 下载文件进行安装
12+
13+
## 使用方式
14+
15+
1. 必须安装[Jetbrains Toolbox App](https://www.jetbrains.com/toolbox-app/),从浏览器跳转IDE需要依赖这个应用提供的协议。
16+
2. 安装[Leetcode Editor](https://github.com/shuzijun/leetcode-editor)插件。
17+
3. 安装本插件,并在选择页面进行配置。
18+
4. 打开leetcode网页,点击图标打开编辑器。
19+
![page](doc/page.png)
20+
21+
## 开发
22+
23+
本插件使用[plasmo](https://github.com/PlasmoHQ/plasmo),相关开发方式参考plasmo

assets/icon.png

29.8 KB
Loading

assets/icon.svg

Lines changed: 21 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)