Prepare for initial preview release

This commit is contained in:
Eric Amodio
2016-08-26 19:09:22 -04:00
parent 1576c08fa8
commit 33fe3c55f7
6 changed files with 39 additions and 58 deletions

View File

@@ -1,65 +1,31 @@
# git-codelens README
# Git CodeLens
This is the README for your extension "git-codelens". After writing up a brief description, we recommend including the following sections.
Provides Git blame (and history eventually) CodeLens for many supported Visual Studio Code languages (in theory -- the language must support symbol searching).
## Features
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
Provides CodeLens with the author and date of the last check-in.
For example if there is an image subfolder under your extension project workspace:
> ![CodeLens](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/master/images/preview-codelens.png)
\!\[feature X\]\(images/feature-x.png\)
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.
> 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.
> ![Blame Explorer](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/master/images/preview-blame.png)
## Requirements
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
Must be using Git and it must be in your path.
## Extension Settings
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
For example:
This extension contributes the following settings:
* `myExtension.enable`: enable/disable this extension
* `myExtension.thing`: set to `blah` to do something
None yet.
## Known Issues
Calling out known issues can help limit users opening duplicate issues against your extension.
Too many to count -- this is still very much a work in progress.
## Release Notes
Users appreciate release notes as you update your extension.
### 0.0.1
### 1.0.0
Initial release of ...
### 1.0.1
Fixed issue #.
### 1.1.0
Added features X, Y, and Z.
-----------------------------------------------------------------------------------------------------------
## Working with Markdown
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
* Split the editor (`Cmd+\` on OSX or `Ctrl+\` on Windows and Linux)
* Toggle preview (`Shift+CMD+V` on OSX or `Shift+Ctrl+V` on Windows and Linux)
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (OSX) to see a list of Markdown snippets
### For more information
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
**Enjoy!**
Initial release but still heavily a work in progress.

BIN
images/preview-blame.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

BIN
images/preview-codelens.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View File

@@ -1,22 +1,25 @@
{
"name": "git-codelens",
"displayName": "Git CodeLens",
"description": "Provides Git blame information in CodeLens",
"version": "0.0.1",
"author": "Eric Amodio",
"publisher": "eamodio",
"engines": {
"vscode": "^1.3.0"
},
"license": "SEE LICENSE IN LICENSE",
"displayName": "Git CodeLens",
"description": "Provides Git blame information in CodeLens",
"categories": [
"Other"
],
"activationEvents": [
"*"
],
"keywords": [
"git", "gitblame", "blame"
],
"galleryBanner": {
"color": "#0000FF",
"theme": "dark"
},
"preview": true,
"main": "./out/src/extension",
"contributes": {
"commands": [{
@@ -25,17 +28,25 @@
"category": "Git"
}]
},
"scripts": {
"vscode:prepublish": "node ./node_modules/vscode/bin/compile",
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install && tsc"
},
"activationEvents": [
"*"
],
"dependencies": {
"tmp": "^0.0.28",
"spawn-rx": "^2.0.1"
"lodash": "^4.15.0",
"moment": "^2.14.1",
"spawn-rx": "^2.0.1",
"tmp": "^0.0.28"
},
"devDependencies": {
"typescript": "^1.8.10",
"vscode": "^0.11.17"
},
"extensionDependencies": [
"donjayamanne.githistory"
],
"scripts": {
"vscode:prepublish": "node ./node_modules/vscode/bin/compile",
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install && tsc"
}
}

View File

@@ -91,7 +91,7 @@ export default class GitCodeLensProvider implements CodeLensProvider {
let sorted = lines.sort((a, b) => b.date.getTime() - a.date.getTime());
recentLine = sorted[0];
console.log(lens.fileName, 'Blame lines:', sorted);
// console.log(lens.fileName, 'Blame lines:', sorted);
let map: Map<string, IGitBlameLine[]> = new Map();
sorted.forEach(l => {

View File

@@ -9,9 +9,13 @@ import {Commands, VsCodeCommands} from './constants';
export function activate(context: ExtensionContext) {
// Workspace not using a folder. No access to git repo.
if (!workspace.rootPath) {
console.warn('Git CodeLens inactive: no rootPath');
return;
}
console.log(`Git CodeLens active: ${workspace.rootPath}`);
gitRepoPath(workspace.rootPath).then(repoPath => {
context.subscriptions.push(workspace.registerTextDocumentContentProvider(GitContentProvider.scheme, new GitContentProvider(context)));