forked from l0o0/jasminum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5ee1772
Showing
69 changed files
with
4,644 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"root": true, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"overrides": [], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/ban-ts-comment": ["warn", "allow-with-description"], | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"@typescript-eslint/no-explicit-any": ["off", { "ignoreRestArgs": true }], | ||
"@typescript-eslint/no-non-null-assertion": "off" | ||
}, | ||
"ignorePatterns": [ | ||
"**/builds/**", | ||
"**/dist/**", | ||
"**/node_modules/**", | ||
"**/scripts/**", | ||
"**/*.js", | ||
"**/*.bak" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# reference: https://github.com/lychichem/jasminum/blob/master/.github/workflows/main.yml | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
name: Upload Release Asset | ||
|
||
jobs: | ||
build: | ||
name: Upload Release Asset | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Set output | ||
id: vars | ||
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | ||
- name: Build project # This would actually build your project, using zip for an example artifact | ||
run: | | ||
zip -r jasminum.xpi chrome LICENSE chrome.manifest install.rdf readme.md | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
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 | ||
asset_path: ./jasminum.xpi | ||
asset_name: jasminum-${{ steps.vars.outputs.tag }}.xpi | ||
asset_content_type: application/x-xpinstall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/builds | ||
node_modules | ||
package-lock.json | ||
zotero-cmd.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"tabWidth": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"npm": { | ||
"publish": false | ||
}, | ||
"github": { | ||
"release": true, | ||
"assets": ["builds/*.xpi"] | ||
}, | ||
"hooks": { | ||
"after:bump": "npm run build", | ||
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
// 使用 IntelliSense 了解相关属性。 | ||
// 悬停以查看现有属性的描述。 | ||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "StartDev", | ||
"runtimeExecutable": "npm", | ||
"runtimeArgs": ["run", "start-watch"] | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Restart", | ||
"runtimeExecutable": "npm", | ||
"runtimeArgs": ["run", "restart"] | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Restart in Prod Mode", | ||
"runtimeExecutable": "npm", | ||
"runtimeArgs": ["run", "restart-prod"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"editor.formatOnType": false, | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"editor.tabSize": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"editor.tabSize": 2, | ||
"files.eol": "\n", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"appendElement - full": { | ||
"scope": "javascript,typescript", | ||
"prefix": "appendElement", | ||
"body": [ | ||
"appendElement({", | ||
"\ttag: '${1:div}',", | ||
"\tid: '${2:id}',", | ||
"\tnamespace: '${3:html}',", | ||
"\tclassList: ['${4:class}'],", | ||
"\tstyles: {${5:style}: '$6'},", | ||
"\tproperties: {},", | ||
"\tattributes: {},", | ||
"\t[{ '${7:onload}', (e: Event) => $8, ${9:false} }],", | ||
"\tcheckExistanceParent: ${10:HTMLElement},", | ||
"\tignoreIfExists: ${11:true},", | ||
"\tskipIfExists: ${12:true},", | ||
"\tremoveIfExists: ${13:true},", | ||
"\tcustomCheck: (doc: Document, options: ElementOptions) => ${14:true},", | ||
"\tchildren: [$15]", | ||
"}, ${16:container});" | ||
] | ||
}, | ||
"appendElement - minimum": { | ||
"scope": "javascript,typescript", | ||
"prefix": "appendElement", | ||
"body": "appendElement({ tag: '$1' }, $2);" | ||
}, | ||
"register Notifier": { | ||
"scope": "javascript,typescript", | ||
"prefix": "registerObserver", | ||
"body": [ | ||
"registerObserver({", | ||
"\t notify: (", | ||
"\t\tevent: _ZoteroTypes.Notifier.Event,", | ||
"\t\ttype: _ZoteroTypes.Notifier.Type,", | ||
"\t\tids: string[],", | ||
"\t\textraData: _ZoteroTypes.anyObj", | ||
"\t) => {", | ||
"\t\t$0", | ||
"\t}", | ||
"});" | ||
] | ||
} | ||
} |
Oops, something went wrong.