/markdown-vscode-contributions

Generate and update automatically Vscode contributions into markdown tables

Primary LanguageTypeScriptMIT LicenseMIT

Markdown VSCode Contributions

This package allows generating and updating tables in markdown format containing VSCode Contributions data with just a few commands

Installation

Using npm:

npm i --save-dev markdown-vscode-contributions

Usage

updateContributions.js

import { markdownVscodeContributions } from "markdown-vscode-contributions";

markdownVscodeContributions({
  packagePath: "package.json",
  inputPath: "README-raw.md",
  outputPath: "README.md",
});

Parameters:

Parameter Description Default value
packagePath Path to the package file, relative to the current root folder 'package.json'
inputPath Path to the input file, relative to the current root folder 'README.md'
outputPath Path to the output file, relative to the current root folder inputPath value *

* by default overwrites the original input file

In your package.json file you should have contributions defined. Example:

{
    "..."
    "contributes": {
        "commands": [
            {
                "command": "color-picker-universal.translateColors",
                "title": "Translate colors to another format",
                "category": "Color Picker Universal"
            }
        ],
    }
}

Then in your markdown file (e.g. README.md) you need a markdown comment with the following format:

[//]: # "vscode-table-contributionName(Column1|Column2:Column2 alias)"

  • The alias of each column is optional
  • Spaces won't be trimmed

SEE SUPPORTED VALUES

Example:

### Commands

[//]: # "vscode-table-commands(title:Name|command)"

After running updateContributions.js you will get the following output:

### Commands

[//]: # "vscode-table-commands(title:Name|command)"

| Name                               | command                                |
| ---------------------------------- | -------------------------------------- |
| Translate colors to another format | color-picker-universal.translateColors |

🌐 Links

NPM

Github Repository