Skip to content

Commit

Permalink
用 typescript 重写
Browse files Browse the repository at this point in the history
  • Loading branch information
shalldie committed Oct 29, 2017
1 parent c72f7c8 commit 03bfe34
Show file tree
Hide file tree
Showing 22 changed files with 436 additions and 342 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules/**
out
node_modules
.vscode-test/
.vsix
16 changes: 11 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// A launch configuration that launches the extension inside a new window
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.1.0",
"configurations": [
Expand All @@ -8,15 +8,21 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
"stopOnEntry": false
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/**/*.js" ],
"preLaunchTask": "npm: watch"
},
{
"name": "Launch Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/test" ],
"stopOnEntry": false
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/test/**/*.js" ],
"preLaunchTask": "npm: watch"
}
]
}
}
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Place your settings in this file to overwrite default and user settings.
{
"vsicons.presets.angular": false
"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
}
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
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
}
}
]
}
10 changes: 6 additions & 4 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.vscode/**
typings/**
test/**
.vscode-test/**
out/test/**
out/**/*.map
src/**
.gitignore
jsconfig.json
node_modules/**
tsconfig.json
vsc-extension-quickstart.md
File renamed without changes.
10 changes: 0 additions & 10 deletions jsconfig.json

This file was deleted.

15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "1.1.15",
"publisher": "shalldie",
"engines": {
"vscode": "^1.0.0"
"vscode": "^1.17.0"
},
"icon": "gif/logo.png",
"categories": [
Expand All @@ -14,7 +14,7 @@
"activationEvents": [
"*"
],
"main": "./extension",
"main": "./out/extension",
"contributes": {
"commands": [
{
Expand Down Expand Up @@ -65,9 +65,16 @@
}
},
"scripts": {
"postinstall": "node ./node_modules/vscode/bin/install"
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "npm run compile && node ./node_modules/vscode/bin/test"
},
"devDependencies": {
"vscode": "^0.11.0"
"typescript": "^2.5.3",
"vscode": "^1.1.5",
"@types/node": "^7.0.43",
"@types/mocha": "^2.2.42"
}
}
170 changes: 0 additions & 170 deletions src/background.js

This file was deleted.

Loading

0 comments on commit 03bfe34

Please sign in to comment.