Skip to content
This repository has been archived by the owner on Oct 10, 2018. It is now read-only.

feat(import-management): Add imports and imports under cursor #383

Merged
merged 15 commits into from
Jan 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ skip_branch_with_pr: true

environment:
nodejs_version: "9"
CODE_TESTS_WORKSPACE: "$(APPVEYOR_BUILD_FOLDER)/test/_workspace"
CODE_TESTS_PATH: "$(APPVEYOR_BUILD_FOLDER)/out/test/single-workspace-tests"
CODE_TESTS_WORKSPACE: "$(APPVEYOR_BUILD_FOLDER)/test/etc/workspace_1"
CODE_TESTS_PATH: "$(APPVEYOR_BUILD_FOLDER)/out/test/single-workspace"

install:
- ps: Install-Product node $env:nodejs_version
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
os: linux
sudo: required
env:
- CODE_TESTS_WORKSPACE=$TRAVIS_BUILD_DIR/test/_workspace
- CODE_TESTS_PATH=$TRAVIS_BUILD_DIR/out/test/single-workspace-tests
- CODE_TESTS_WORKSPACE=$TRAVIS_BUILD_DIR/test/etc/workspace_1
- CODE_TESTS_PATH=$TRAVIS_BUILD_DIR/out/test/single-workspace
addons:
apt:
sources:
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceRoot}/test/_workspace",
"${workspaceRoot}/test/etc/workspace_1",
"--extensionDevelopmentPath=${workspaceRoot}"
],
"env": {
Expand All @@ -25,7 +25,7 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceRoot}/test/multi-root.code-workspace",
"${workspaceRoot}/test/etc/multi-root.code-workspace",
"--extensionDevelopmentPath=${workspaceRoot}"
],
"env": {
Expand Down
9 changes: 3 additions & 6 deletions config/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
"moduleResolution": "node",
"lib": [
"es6",
"es2017",
"dom"
"es2017"
],
"rootDir": "../src",
"rootDir": "../",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noUnusedLocals": true,
Expand All @@ -22,8 +21,6 @@
"../src/**/*"
],
"exclude": [
"../src/_old",
"../node_modules",
"../out"
"../src/_old"
]
}
9 changes: 1 addition & 8 deletions config/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{
"extends": "./tsconfig.base.json",
"include": [
"../src/**/*"
],
"exclude": [
"../src/_old",
"../test"
]
"extends": "./tsconfig.base.json"
}
12 changes: 12 additions & 0 deletions config/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.base.json",
"include": [
"../src/**/*",
"../test/**/*"
],
"exclude": [
"../src/_old",
"../test/_old",
"../test/etc"
]
}
19 changes: 0 additions & 19 deletions jest.json

This file was deleted.

64 changes: 53 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"Other",
"Languages"
],
"main": "./out/extension",
"main": "./out/src/extension",
"author": "Christoph Bühler <[email protected]>",
"license": "MIT",
"contributors": [],
Expand Down Expand Up @@ -58,9 +58,7 @@
"build": "npm run clean && tsc -p ./config/tsconfig.build.json",
"develop": "npm run clean && tsc -p .",
"lint": "tslint -c ./tslint.json -p ./config/tsconfig.build.json",
"test": "npm run lint && npm run clean && jest -c ./jest.json",
"test:watch": "npm run clean && jest -c ./jest.json --watch --no-coverage",
"test:vscode": "echo 'beside unit test with jest, there could be integration test with node ./node_modules/vscode/bin/test'",
"test": "npm run lint && npm run clean && tsc -p ./config/tsconfig.test.json && node ./node_modules/vscode/bin/test",
"semantic-release": "semantic-release"
},
"release": {
Expand All @@ -82,25 +80,25 @@
},
"devDependencies": {
"@smartive/tslint-config": "^2.0.0",
"@types/jest": "^22.0.1",
"@types/chai": "^4.1.1",
"@types/mocha": "^2.2.46",
"@types/node": "^9.3.0",
"@types/reflect-metadata": "0.1.0",
"cross-env": "^5.1.3",
"@types/sinon": "^4.1.3",
"@types/sinon-chai": "^2.7.29",
"chai": "^4.1.2",
"del-cli": "^1.1.0",
"filewalker": "^0.1.3",
"jest": "^22.1.2",
"semantic-release": "^12.2.2",
"semantic-release-vsce": "^1.0.2",
"ts-jest": "^22.0.1",
"sinon": "^4.2.0",
"sinon-chai": "^2.14.0",
"tslint": "^5.9.1",
"tsutils": "^2.19.1",
"vscode": "^1.1.10"
},
"dependencies": {
"inversify": "^4.9.0",
"inversify-inject-decorators": "^3.1.0",
"reflect-metadata": "^0.1.12",
"rxjs": "^5.5.6",
"tslib": "^1.8.1",
"typescript": "~2.6.2",
"typescript-parser": "^2.2.2",
Expand All @@ -114,6 +112,14 @@
],
"contributes": {
"commands": [
{
"command": "typescriptHero.index.addImport",
"title": "TS Hero: Add an import to current file"
},
{
"command": "typescriptHero.index.addImportUnderCursor",
"title": "TS Hero: Adds the current symbol under the cursor as an import to current file"
},
{
"command": "typescriptHero.imports.organize",
"title": "TS Hero: Organize imports (sort and remove unused)"
Expand All @@ -124,6 +130,16 @@
}
],
"keybindings": [
{
"command": "typescriptHero.index.addImport",
"key": "ctrl+shift+i",
"when": "editorTextFocus"
},
{
"command": "typescriptHero.index.addImportUnderCursor",
"key": "ctrl+alt+i",
"when": "editorTextFocus"
},
{
"command": "typescriptHero.imports.organize",
"key": "ctrl+alt+o",
Expand Down Expand Up @@ -305,6 +321,32 @@
],
"description": "Defines the groups of the imports ordering. Multiple groups possible, see readme for instructions.",
"scope": "resource"
},
"typescriptHero.index.workspaceIgnorePatterns": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true,
"default": [
"**/build/**/*",
"**/out/**/*",
"**/dist/**/*"
],
"description": "Defines partial pathes (globs) that are ignored during indexing of the **workspace**.",
"scope": "resource"
},
"typescriptHero.index.moduleIgnorePatterns": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true,
"default": [
"**/node_modules/**/*"
],
"description": "Defines partial pathes (globs) that are ignored during indexing of the **node_modules**. This patterns are attached to the node_module/<name> of each found module.",
"scope": "resource"
}
}
}
Expand Down
21 changes: 0 additions & 21 deletions src/_old/common/quick-pick-items/ResolveQuickPickItem.ts

This file was deleted.

Loading