/owngitextension

A Visual Studio Code Extension that offers tools for working with GitHub projects.

Primary LanguageJavaScriptMIT LicenseMIT


OwnGitExtensionLogo

OwnGitExtension

A Visual Studio Code Extension that offers tools for working with GitHub projects.

current release license stars last commit


Features

Create GitHub Repository Files

Will create files based on the templates in FileTemplates.json file as well as a LICENSE and a .gitignore file. Default Files are: README.md, CHANGELOG.md and ideas.txt.

CreateGitHubRepoDemo

Add Markdown Overview

Adds a Overview to your markdown file, at the current position of your cursor.

AddMarkdownOverviewDemo

Add New Version

Adds a new Version to your repository.

AddNewVersionDemo

Link To File

Adds a link to a file, in Markdown or HTML style, to the position of the cursor.

LinkToFileDemo


Installation

  • Clone this repository (recommended under ~/.vscode/extensions):
git clone https://github.com/phil1436/owngitextension C:\Users\<your-user>\.vscode\extensions\owngitextension

or download the latest realease and extract the file into ~/.vscode/extensions.

  • If the extension did not got installed, run the command Developer: Install Extension from Location... and choose the extension folder.

Workspace

This extension will create a directory named owngitextension-workspace in the same directory as the extension. The workspace contains all template files, so your changes in those files will not be lost when installing a new version.


Commands

Own Git Repository

  • Create GitHub Repository Files: Creates standard files for a new GitHub repository.
  • Edit File Templates: Opens the FileTemplates.json file.
  • Add New Version: Adds a new Version to your current repository.

Own Git Markdown

  • Add Markdown Overview: Adds a Overview to your markdown file.
  • Link To File: Adds a link to a file, in Markdown or HTML style, to the position of the cursor.

Own Git License

  • Add License Template: Add a Custom license template.
  • Edit License Template: Edit a existing license template.

Configuration

Go to File > Preferences > Settings and than navigate to Extensions > OwnGitExtension.

  • GitHubName: Your GitHub name.
  • FullName: Your full name.

New Version

  • Edit Package File: If enabled adds a new Version to the package.json file
  • Edit Package Lock File: If enabled adds a new Version to the package-lock.json file

Overview

  • Include First Headings: If enabled will include the first level headings in the overview. (default is false)

File Templates

You can configure the File Templates in the FileTemplates.json file. Open it with Edit File Templates. This files will be created with Create GitHub Repository Files Command. Add a new file template in the File Templates array as JSON object:

  • name: The name of the file with the file ending.
  • text: An array of strings with the text in the file. You can use placeholders (view __comment).
  • gitignore(optional): If set to true will add the file to the .gitignore file (default is false).
  • open(optional): If set to true eill open the file after it was created (default is false).

Example:

"File Templates":[
  {
    "name":"path/to/myFile.md",
    "gitignore":true,
    "open":true,
    "text":[
      "This is Line 1",
      "This is Line 2",
      "This is Line 3"
    ]
  },
  ...
]

Bugs

  • no known bugs

  • Bug fixes
  • Configuration added

by Philipp B.