-
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.
chore: initial release of leek-fund-lite
- Loading branch information
mars
committed
Jan 26, 2025
0 parents
commit 151723f
Showing
18 changed files
with
936 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,21 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"ignorePatterns": [ | ||
"out", | ||
"dist", | ||
"**/*.d.ts" | ||
] | ||
} |
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,16 @@ | ||
out | ||
dist | ||
node_modules | ||
.vscode-test/ | ||
*.vsix | ||
.DS_Store | ||
package-lock.json | ||
demo/donate.html | ||
demo/api.html | ||
yarn-error.log | ||
|
||
template/leek-center/build | ||
template-packages/leek-center/.eslintcache | ||
!template-packages/leek-center/yarn.lock | ||
|
||
.idea |
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,9 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"semi": true, | ||
"bracketSpacing": true, | ||
"arrowParens": "always" | ||
} |
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,25 @@ | ||
// A launch configuration that compiles the extension and then opens it inside a new window | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"runtimeExecutable": "${execPath}", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/out/**/*.js" | ||
], | ||
"preLaunchTask": "${defaultBuildTask}", | ||
"env": { | ||
"NODE_ENV": "development" | ||
} | ||
} | ||
] | ||
} |
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,11 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"files.exclude": { | ||
"out": false // set this to true to hide the "out" folder with the compiled JS files | ||
}, | ||
"search.exclude": { | ||
"out": true // set this to false to include "out" folder in search results | ||
}, | ||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts | ||
"typescript.tsc.autoDetect": "off" | ||
} |
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,20 @@ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "watch", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
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,9 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
src/** | ||
.gitignore | ||
vsc-extension-quickstart.md | ||
**/tsconfig.json | ||
**/.eslintrc.json | ||
**/*.map | ||
**/*.ts |
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,10 @@ | ||
# Change Log | ||
|
||
## 1.0.0 (2025-01-25) | ||
|
||
Initial release of leek-fund-lite: | ||
|
||
- Support fund data display | ||
- Support stock data display | ||
- Auto refresh data | ||
- Manual refresh data |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,16 @@ | ||
# Leek Fund Lite | ||
|
||
A simple VSCode extension for viewing fund and stock data, inspired by [LeekHub/leek-fund](https://github.com/LeekHub/leek-fund). | ||
|
||
## Features | ||
|
||
- Real-time fund data display | ||
- Real-time stock data display | ||
- Auto refresh data | ||
- Manual refresh data | ||
|
||
## Usage | ||
|
||
1. Configure fund codes | ||
2. Configure stock codes | ||
3. View data in sidebar |
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,159 @@ | ||
{ | ||
"name": "leek-fund-lite", | ||
"displayName": "Leek Fund Lite", | ||
"description": "A VSCode extension for viewing fund and stock data", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"engines": { | ||
"vscode": "^1.52.0" | ||
}, | ||
"categories": [ | ||
"Other" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/zomixi/leek-fund-lite.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/zomixi/leek-fund-lite/issues" | ||
}, | ||
"icon": "logo.png", | ||
"publisher": "zomixi", | ||
"main": "./dist/extension.js", | ||
"activationEvents": [ | ||
"onStartupFinished" | ||
], | ||
"contributes": { | ||
"viewsContainers": { | ||
"activitybar": [ | ||
{ | ||
"id": "leekFundLite", | ||
"title": "Leek Fund Lite", | ||
"icon": "$(graph)" | ||
} | ||
] | ||
}, | ||
"views": { | ||
"leekFundLite": [ | ||
{ | ||
"id": "leekFundLite.fund", | ||
"name": "Funds" | ||
}, | ||
{ | ||
"id": "leekFundLite.stock", | ||
"name": "Stocks" | ||
} | ||
] | ||
}, | ||
"commands": [ | ||
{ | ||
"command": "leek-fund-lite.refreshFund", | ||
"title": "Refresh Fund Data", | ||
"icon": "$(refresh)" | ||
}, | ||
{ | ||
"command": "leek-fund-lite.refreshStock", | ||
"title": "Refresh Stock Data", | ||
"icon": "$(refresh)" | ||
}, | ||
{ | ||
"command": "leek-fund-lite.addFund", | ||
"title": "Add Fund", | ||
"icon": "$(add)" | ||
}, | ||
{ | ||
"command": "leek-fund-lite.addStock", | ||
"title": "Add Stock", | ||
"icon": "$(add)" | ||
}, | ||
{ | ||
"command": "leek-fund-lite.deleteFund", | ||
"title": "Delete Fund", | ||
"icon": "$(trash)" | ||
}, | ||
{ | ||
"command": "leek-fund-lite.deleteStock", | ||
"title": "Delete Stock", | ||
"icon": "$(trash)" | ||
} | ||
], | ||
"configuration": { | ||
"title": "Leek Fund Lite", | ||
"properties": { | ||
"leek-fund-lite.funds": { | ||
"type": "array", | ||
"default": [], | ||
"description": "Fund code list" | ||
}, | ||
"leek-fund-lite.stocks": { | ||
"type": "array", | ||
"default": [], | ||
"description": "Stock code list" | ||
}, | ||
"leek-fund-lite.interval": { | ||
"type": "number", | ||
"default": 10000, | ||
"description": "Refresh interval (ms)" | ||
} | ||
} | ||
}, | ||
"menus": { | ||
"view/title": [ | ||
{ | ||
"command": "leek-fund-lite.addFund", | ||
"when": "view == leekFundLite.fund", | ||
"group": "navigation" | ||
}, | ||
{ | ||
"command": "leek-fund-lite.refreshFund", | ||
"when": "view == leekFundLite.fund", | ||
"group": "navigation" | ||
}, | ||
{ | ||
"command": "leek-fund-lite.addStock", | ||
"when": "view == leekFundLite.stock", | ||
"group": "navigation" | ||
}, | ||
{ | ||
"command": "leek-fund-lite.refreshStock", | ||
"when": "view == leekFundLite.stock", | ||
"group": "navigation" | ||
} | ||
], | ||
"view/item/context": [ | ||
{ | ||
"command": "leek-fund-lite.deleteFund", | ||
"when": "view == leekFundLite.fund && viewItem == fundItem", | ||
"group": "inline" | ||
}, | ||
{ | ||
"command": "leek-fund-lite.deleteStock", | ||
"when": "view == leekFundLite.stock && viewItem == stockItem", | ||
"group": "inline" | ||
} | ||
] | ||
} | ||
}, | ||
"scripts": { | ||
"vscode:prepublish": "npm run compile", | ||
"compile": "tsc -p ./", | ||
"watch": "tsc -watch -p ./", | ||
"lint": "eslint src --ext ts", | ||
"format": "prettier --write \"src/**/*.ts\"" | ||
}, | ||
"dependencies": { | ||
"node-fetch": "^2.6.7", | ||
"iconv-lite": "^0.6.3" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^14.14.7", | ||
"@types/vscode": "^1.52.0", | ||
"@typescript-eslint/eslint-plugin": "^5.59.0", | ||
"@typescript-eslint/parser": "^5.59.0", | ||
"eslint": "^8.38.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"prettier": "^2.8.7", | ||
"typescript": "^4.1.2", | ||
"@types/node-fetch": "^2.6.3" | ||
} | ||
} |
Oops, something went wrong.