Skip to content

Commit

Permalink
同步github的源代码
Browse files Browse the repository at this point in the history
  • Loading branch information
qaqhub committed Oct 26, 2024
1 parent b9ad3e7 commit 1cebcea
Show file tree
Hide file tree
Showing 67 changed files with 10,758 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
tab_width = 4
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/

main.js
23 changes: 23 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"env": { "node": true },
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"sourceType": "module"
},
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
"@typescript-eslint/ban-ts-comment": "off",
"no-prototype-builtins": "off",
"@typescript-eslint/no-empty-function": "off"
}
}
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# vscode
.vscode

# Intellij
*.iml
.idea

# npm
node_modules

# Don't include the compiled main.js file in the repo.
# They should be uploaded to GitHub releases instead.
main.js

# Exclude sourcemaps
*.map

# obsidian
data.json

# Exclude macOS Finder (System Explorer) View States
.DS_Store


#
笔记.md
repealed.ts
README.md
i18n
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tag-version-prefix=""
16 changes: 16 additions & 0 deletions directory/zh-cn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{
"id": "demo",
"translations": {
"1.0.1": "1728807307123",
"1.0.2": "1728807502321"
}
},
{
"id": "demo1",
"translations": {
"1.0.1": "1728807307123",
"1.0.2": "1728807502321"
}
}
]
49 changes: 49 additions & 0 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import esbuild from "esbuild";
import process from "process";
import builtins from "builtin-modules";

const banner =
`/*
这是 ESBUILD 生成/绑定 的文件
如果你想查看源代码,请访问该插件的github存储库
*/
`;

const prod = (process.argv[2] === "production");

const context = await esbuild.context({
banner: {
js: banner,
},
// 修改启动路径
entryPoints: ["main.ts"],
bundle: true,
external: [
"obsidian",
"electron",
"@codemirror/autocomplete",
"@codemirror/collab",
"@codemirror/commands",
"@codemirror/language",
"@codemirror/lint",
"@codemirror/search",
"@codemirror/state",
"@codemirror/view",
"@lezer/common",
"@lezer/highlight",
"@lezer/lr",
...builtins],
format: "cjs",
target: "es2018",
logLevel: "info",
sourcemap: prod ? false : "inline",
treeShaking: true,
outfile: "main.js",
});

if (prod) {
await context.rebuild();
process.exit(0);
} else {
await context.watch();
}
3 changes: 3 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import I18n from './src/main'

export default I18n
10 changes: 10 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"id": "i18n",
"name": "I18N",
"version": "1.5.3",
"minAppVersion": "1.5.8",
"description": "专为Obsidian打造的插件国际化工具,助力用户轻松跨越语言障碍,实现插件界面的无缝汉化。",
"author": "zero & 曲淡歌",
"authorUrl": "https://github.com/0011000000110010/",
"isDesktopOnly": true
}
Loading

0 comments on commit 1cebcea

Please sign in to comment.