Skip to content

Commit

Permalink
refactor: 变更项目名
Browse files Browse the repository at this point in the history
  • Loading branch information
ihupoo committed Mar 4, 2021
1 parent 70daf43 commit ca7ab29
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
8 changes: 3 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Change Log

All notable changes to the "git-commit" extension will be documented in this file.
All notable changes to the "git-simple-commit" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [0.0.1]

## [Unreleased]

- Initial release
- Initial release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# git-commit-simple
# git-simple-commit

基于 [vscode-conventional-commits](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits) 的简易版

Expand Down
28 changes: 19 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "git-commit-simple",
"displayName": "git-commit-simple",
"name": "git-simple-commit",
"displayName": "git-simple-commit",
"description": "Simple git commit for VSCode",
"version": "0.0.1",
"icon": "assets/logo.png",
"publisher": "ihupoo",
"engines": {
"vscode": "^1.14.0"
"vscode": "^1.53.0"
},
"categories": [
"Other"
Expand All @@ -16,15 +17,24 @@
"simple",
"conventional"
],
"repository": {
"type": "git",
"url": "https://github.com/ihupoo/vscode-git-simple-commit.git"
},
"author": "ihupoo",
"homepage": "https://github.com/ihupoo/vscode-git-simple-commit",
"bugs": {
"url": "https://github.com/ihupoo/vscode-git-simple-commit/issues"
},
"activationEvents": [
"onCommand:extension.gitCommitSimple"
"onCommand:extension.gitSimpleCommit"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "extension.gitCommitSimple",
"title": "git-commit-lint",
"command": "extension.gitSimpleCommit",
"title": "git-simple-commit: 约定式提交",
"icon":{
"dark": "./assets/git-commit-dark.svg",
"light": "./assets/git-commit-light.svg"
Expand All @@ -35,15 +45,15 @@
"scm/title": [
{
"when": "scmProvider == git",
"command": "extension.gitCommitSimple",
"command": "extension.gitSimpleCommit",
"group": "navigation"
}
]
},
"configuration":{
"title": "git-commit-simple",
"title": "git-simple-commit",
"properties": {
"gitCommitSimple.autoCommit":{
"gitSimpleCommit.autoCommit":{
"type":"boolean",
"default": true,
"markdownDescription": "是否自动提交改动。"
Expand Down
6 changes: 3 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getGitAPI, getRepository, getCommitMessage } from './utils';

export function activate(context: vscode.ExtensionContext) {
let disposable = vscode.commands.registerCommand(
'extension.gitCommitSimple',
'extension.gitSimpleCommit',
async () => {
try{
const git = getGitAPI();
Expand All @@ -16,13 +16,13 @@ export function activate(context: vscode.ExtensionContext) {
const message = serialize(commitMessage);
vscode.commands.executeCommand('workbench.view.scm');
repository.inputBox.value = message;
const autoCommit = vscode.workspace.getConfiguration().get('gitCommitSimple.autoCommit');
const autoCommit = vscode.workspace.getConfiguration().get('gitSimpleCommit.autoCommit');
if(autoCommit){
await vscode.commands.executeCommand('git.commit', repository);
}

}catch(e){
vscode.window.showErrorMessage(`git-commit-simple:${e.message}`);
vscode.window.showErrorMessage(`git-simple-commit${e.message}`);
}

}
Expand Down

0 comments on commit ca7ab29

Please sign in to comment.