mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-11 18:48:38 -05:00
Prepare for initial preview release
This commit is contained in:
56
README.md
56
README.md
@@ -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
|
## 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:
|
> 
|
||||||
|
|
||||||
\!\[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.
|
> 
|
||||||
|
|
||||||
## Requirements
|
## 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
|
## Extension Settings
|
||||||
|
|
||||||
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
|
None yet.
|
||||||
|
|
||||||
For example:
|
|
||||||
|
|
||||||
This extension contributes the following settings:
|
|
||||||
|
|
||||||
* `myExtension.enable`: enable/disable this extension
|
|
||||||
* `myExtension.thing`: set to `blah` to do something
|
|
||||||
|
|
||||||
## Known Issues
|
## 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
|
## Release Notes
|
||||||
|
|
||||||
Users appreciate release notes as you update your extension.
|
### 0.0.1
|
||||||
|
|
||||||
### 1.0.0
|
Initial release but still heavily a work in progress.
|
||||||
|
|
||||||
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!**
|
|
||||||
BIN
images/preview-blame.png
Normal file
BIN
images/preview-blame.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 185 KiB |
BIN
images/preview-codelens.png
Normal file
BIN
images/preview-codelens.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 124 KiB |
35
package.json
35
package.json
@@ -1,22 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "git-codelens",
|
"name": "git-codelens",
|
||||||
"displayName": "Git CodeLens",
|
|
||||||
"description": "Provides Git blame information in CodeLens",
|
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"author": "Eric Amodio",
|
"author": "Eric Amodio",
|
||||||
"publisher": "eamodio",
|
"publisher": "eamodio",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.3.0"
|
"vscode": "^1.3.0"
|
||||||
},
|
},
|
||||||
|
"license": "SEE LICENSE IN LICENSE",
|
||||||
|
"displayName": "Git CodeLens",
|
||||||
|
"description": "Provides Git blame information in CodeLens",
|
||||||
"categories": [
|
"categories": [
|
||||||
"Other"
|
"Other"
|
||||||
],
|
],
|
||||||
"activationEvents": [
|
|
||||||
"*"
|
|
||||||
],
|
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"git", "gitblame", "blame"
|
"git", "gitblame", "blame"
|
||||||
],
|
],
|
||||||
|
"galleryBanner": {
|
||||||
|
"color": "#0000FF",
|
||||||
|
"theme": "dark"
|
||||||
|
},
|
||||||
|
"preview": true,
|
||||||
"main": "./out/src/extension",
|
"main": "./out/src/extension",
|
||||||
"contributes": {
|
"contributes": {
|
||||||
"commands": [{
|
"commands": [{
|
||||||
@@ -25,17 +28,25 @@
|
|||||||
"category": "Git"
|
"category": "Git"
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
"scripts": {
|
"activationEvents": [
|
||||||
"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"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tmp": "^0.0.28",
|
"lodash": "^4.15.0",
|
||||||
"spawn-rx": "^2.0.1"
|
"moment": "^2.14.1",
|
||||||
|
"spawn-rx": "^2.0.1",
|
||||||
|
"tmp": "^0.0.28"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^1.8.10",
|
"typescript": "^1.8.10",
|
||||||
"vscode": "^0.11.17"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,7 @@ export default class GitCodeLensProvider implements CodeLensProvider {
|
|||||||
let sorted = lines.sort((a, b) => b.date.getTime() - a.date.getTime());
|
let sorted = lines.sort((a, b) => b.date.getTime() - a.date.getTime());
|
||||||
recentLine = sorted[0];
|
recentLine = sorted[0];
|
||||||
|
|
||||||
console.log(lens.fileName, 'Blame lines:', sorted);
|
// console.log(lens.fileName, 'Blame lines:', sorted);
|
||||||
|
|
||||||
let map: Map<string, IGitBlameLine[]> = new Map();
|
let map: Map<string, IGitBlameLine[]> = new Map();
|
||||||
sorted.forEach(l => {
|
sorted.forEach(l => {
|
||||||
|
|||||||
@@ -9,9 +9,13 @@ import {Commands, VsCodeCommands} from './constants';
|
|||||||
export function activate(context: ExtensionContext) {
|
export function activate(context: ExtensionContext) {
|
||||||
// Workspace not using a folder. No access to git repo.
|
// Workspace not using a folder. No access to git repo.
|
||||||
if (!workspace.rootPath) {
|
if (!workspace.rootPath) {
|
||||||
|
console.warn('Git CodeLens inactive: no rootPath');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(`Git CodeLens active: ${workspace.rootPath}`);
|
||||||
|
|
||||||
gitRepoPath(workspace.rootPath).then(repoPath => {
|
gitRepoPath(workspace.rootPath).then(repoPath => {
|
||||||
context.subscriptions.push(workspace.registerTextDocumentContentProvider(GitContentProvider.scheme, new GitContentProvider(context)));
|
context.subscriptions.push(workspace.registerTextDocumentContentProvider(GitContentProvider.scheme, new GitContentProvider(context)));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user