Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Nov 26, 2018
0 parents commit 43cfc4d
Show file tree
Hide file tree
Showing 16 changed files with 775 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = false
trim_trailing_whitespace = true
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# IDE
# .vscode

/node_modules
package-lock.json
npm-debug.log
yarn.lock
*.vsix
/out
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 80,
"singleQuote": true,
"trailingComma": "all"
}
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"stopOnEntry": false,
"sourceMaps": true,
"preLaunchTask": "npm",
"outFiles": [
"${workspaceRoot}/out/**/*.js"
]
}]
}
31 changes: 31 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process

// A task runner that calls a custom npm script that compiles the extension.
{
"tasks": [{
"taskName": "npm",
// we want to run npm
"command": "npm",
// the command is a shell script
"isShellCommand": true,
// show the output window only if unrecognized errors occur.
"showOutput": "silent",
// we run the custom script "compile" as defined in package.json
"args": [
"run",
"watch",
"--loglevel",
"silent"
],
// The tsc compiler is started in watching mode
"isBackground": true,
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
"problemMatcher": "$tsc-watch"
}]
}
6 changes: 6 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.vscode/**
node_modules/**
src/**
.editorconfig
.gitignore
vsc-extension-quickstart.md
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018-present 卡色<cipchk@qq.com>

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.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## zh-hans-tt-hant-vscode

**简体与繁体互转**:VSCODE 中文简繁体转换器-支持台湾地区惯用词汇替换。

> 转换器来自 [chinese-transverter](https://github.com/mumuy/chinese-transverter)
## 如何使用

打开命令面板,搜索 `zh-hans-tt-hant` 字样找到对应的命令,回车即可。

## 命令列表

| 命令 | 描述 |
| ---- | ---- |
| `zh-hans-to-zh-hant` | 简体转繁体 |
| `zh-hant-to-zh-hans` | 繁体转简体 |
| `zh-hans-to-zh-hant-tw` | 简体转繁体-含台湾地区惯用词 |
| `zh-hant-to-zh-hans-tw` | 繁体转简体-含台湾地区惯用词 |
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "zh-hans-tt-hant-vscode",
"displayName": "简体与繁体互转",
"description": "中文简体与繁体互转,支持台湾地区惯用词汇替换",
"version": "1.0.0",
"icon": "icon.png",
"publisher": "cipchk",
"license": "MIT",
"licenseUrl": "LICENSE",
"homepage": "https://github.com/cipchk/zh-hans-tt-hant-vscode/blob/master/README.md",
"repository": {
"type": "git",
"url": "https://github.com/cipchk/zh-hans-tt-hant-vscode.git"
},
"bugs": {
"url": "https://github.com/cipchk/zh-hans-tt-hant-vscode/issues",
"email": "cipchk@qq.com"
},
"engines": {
"vscode": "^1.12.0"
},
"galleryBanner": {
"color": "#ffffff",
"theme": "light"
},
"categories": [
"Other",
"Programming Languages"
],
"activationEvents": [
"onCommand:zh-hans-to-zh-hant",
"onCommand:zh-hant-to-zh-hans",
"onCommand:zh-hans-to-zh-hant-tw",
"onCommand:zh-hant-to-zh-hans-tw"
],
"main": "./out/src/extension",
"contributes": {
"commands": [{
"command": "zh-hans-to-zh-hant",
"title": "zh-hans-to-zh-hant(简体转繁体)"
},
{
"command": "zh-hant-to-zh-hans",
"title": "zh-hant-to-zh-hans(繁体转简体)"
},
{
"command": "zh-hans-to-zh-hant-tw",
"title": "zh-hans-to-zh-hant-tw(简体转繁体-含台湾地区惯用词)"
},
{
"command": "zh-hant-to-zh-hans-tw",
"title": "zh-hant-to-zh-hans-tw(繁体转简体-含台湾地区惯用词)"
}
]
},
"scripts": {
"prod": "tsc -p ./",
"watch": "tsc -watch -p ./",
"package": "vsce package",
"publish": "run-s prod package",
"postinstall": "node ./node_modules/vscode/bin/install"
},
"devDependencies": {
"@types/node": "^10.12.2",
"typescript": "^3.1.6",
"vscode": "^1.1.21"
}
}
Loading

0 comments on commit 43cfc4d

Please sign in to comment.