Skip to content

Commit 33fe3c5

Browse files
author
Eric Amodio
committed
Prepare for initial preview release
1 parent 1576c08 commit 33fe3c5

File tree

6 files changed

+39
-58
lines changed

6 files changed

+39
-58
lines changed

README.md

Lines changed: 11 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,31 @@
1-
# git-codelens README
1+
# Git CodeLens
22

3-
This is the README for your extension "git-codelens". After writing up a brief description, we recommend including the following sections.
3+
Provides Git blame (and history eventually) CodeLens for many supported Visual Studio Code languages (in theory -- the language must support symbol searching).
44

55
## Features
66

7-
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
7+
Provides CodeLens with the author and date of the last check-in.
88

9-
For example if there is an image subfolder under your extension project workspace:
9+
> ![CodeLens](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/master/images/preview-codelens.png)
1010
11-
\!\[feature X\]\(images/feature-x.png\)
11+
Clicking on a CodeLens opens a blame "explorer" with the commits and changed lines in the right pane and the commit (file) contents on the left.
1212

13-
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
13+
> ![Blame Explorer](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/master/images/preview-blame.png)
1414
1515
## Requirements
1616

17-
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
17+
Must be using Git and it must be in your path.
1818

1919
## Extension Settings
2020

21-
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
22-
23-
For example:
24-
25-
This extension contributes the following settings:
26-
27-
* `myExtension.enable`: enable/disable this extension
28-
* `myExtension.thing`: set to `blah` to do something
21+
None yet.
2922

3023
## Known Issues
3124

32-
Calling out known issues can help limit users opening duplicate issues against your extension.
25+
Too many to count -- this is still very much a work in progress.
3326

3427
## Release Notes
3528

36-
Users appreciate release notes as you update your extension.
37-
38-
### 1.0.0
39-
40-
Initial release of ...
41-
42-
### 1.0.1
43-
44-
Fixed issue #.
45-
46-
### 1.1.0
47-
48-
Added features X, Y, and Z.
49-
50-
-----------------------------------------------------------------------------------------------------------
51-
52-
## Working with Markdown
53-
54-
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
55-
56-
* Split the editor (`Cmd+\` on OSX or `Ctrl+\` on Windows and Linux)
57-
* Toggle preview (`Shift+CMD+V` on OSX or `Shift+Ctrl+V` on Windows and Linux)
58-
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (OSX) to see a list of Markdown snippets
59-
60-
### For more information
61-
62-
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
63-
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
29+
### 0.0.1
6430

65-
**Enjoy!**
31+
Initial release but still heavily a work in progress.

images/preview-blame.png

185 KB
Loading

images/preview-codelens.png

124 KB
Loading

package.json

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
{
22
"name": "git-codelens",
3-
"displayName": "Git CodeLens",
4-
"description": "Provides Git blame information in CodeLens",
53
"version": "0.0.1",
64
"author": "Eric Amodio",
75
"publisher": "eamodio",
86
"engines": {
97
"vscode": "^1.3.0"
108
},
9+
"license": "SEE LICENSE IN LICENSE",
10+
"displayName": "Git CodeLens",
11+
"description": "Provides Git blame information in CodeLens",
1112
"categories": [
1213
"Other"
1314
],
14-
"activationEvents": [
15-
"*"
16-
],
1715
"keywords": [
1816
"git", "gitblame", "blame"
1917
],
18+
"galleryBanner": {
19+
"color": "#0000FF",
20+
"theme": "dark"
21+
},
22+
"preview": true,
2023
"main": "./out/src/extension",
2124
"contributes": {
2225
"commands": [{
@@ -25,17 +28,25 @@
2528
"category": "Git"
2629
}]
2730
},
28-
"scripts": {
29-
"vscode:prepublish": "node ./node_modules/vscode/bin/compile",
30-
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
31-
"postinstall": "node ./node_modules/vscode/bin/install && tsc"
32-
},
31+
"activationEvents": [
32+
"*"
33+
],
3334
"dependencies": {
34-
"tmp": "^0.0.28",
35-
"spawn-rx": "^2.0.1"
35+
"lodash": "^4.15.0",
36+
"moment": "^2.14.1",
37+
"spawn-rx": "^2.0.1",
38+
"tmp": "^0.0.28"
3639
},
3740
"devDependencies": {
3841
"typescript": "^1.8.10",
3942
"vscode": "^0.11.17"
43+
},
44+
"extensionDependencies": [
45+
"donjayamanne.githistory"
46+
],
47+
"scripts": {
48+
"vscode:prepublish": "node ./node_modules/vscode/bin/compile",
49+
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
50+
"postinstall": "node ./node_modules/vscode/bin/install && tsc"
4051
}
4152
}

src/codeLensProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default class GitCodeLensProvider implements CodeLensProvider {
9191
let sorted = lines.sort((a, b) => b.date.getTime() - a.date.getTime());
9292
recentLine = sorted[0];
9393

94-
console.log(lens.fileName, 'Blame lines:', sorted);
94+
// console.log(lens.fileName, 'Blame lines:', sorted);
9595

9696
let map: Map<string, IGitBlameLine[]> = new Map();
9797
sorted.forEach(l => {

src/extension.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ import {Commands, VsCodeCommands} from './constants';
99
export function activate(context: ExtensionContext) {
1010
// Workspace not using a folder. No access to git repo.
1111
if (!workspace.rootPath) {
12+
console.warn('Git CodeLens inactive: no rootPath');
13+
1214
return;
1315
}
1416

17+
console.log(`Git CodeLens active: ${workspace.rootPath}`);
18+
1519
gitRepoPath(workspace.rootPath).then(repoPath => {
1620
context.subscriptions.push(workspace.registerTextDocumentContentProvider(GitContentProvider.scheme, new GitContentProvider(context)));
1721

0 commit comments

Comments
 (0)