Skip to content

Commit

Permalink
Merge pull request #9 from ClydeDz/dev/0.3.0
Browse files Browse the repository at this point in the history
Add more details to overview readme file, make extension public, and other minor updates.
  • Loading branch information
ClydeDz committed Dec 29, 2020
2 parents 3df225a + aa10cff commit cc06101
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>

# Markdown to API
This is an Azure DevOps task that generates JSON files from Markdown files which can then be consumed by your frontend app. Basically, a static API generator.
This is an Azure DevOps task that generates JSON files from Markdown files which can then be consumed by your front-end app. Basically, a static API generator.

[![Azure DevOps builds](https://img.shields.io/azure-devops/build/clydedsouza/e3d74bc0-b833-41ea-8ec1-0d74115d662a/33?logo=Azure%20DevOps)](https://clydedsouza.visualstudio.com/Markdown%20to%20API/_build)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/clydedsouza/Markdown%2520to%2520API/33?logo=Azure%20DevOps)](https://clydedsouza.visualstudio.com/Markdown%20to%20API/_build)
Expand All @@ -15,19 +15,25 @@ This is an Azure DevOps task that generates JSON files from Markdown files which
![MIT License](https://img.shields.io/static/v1.svg?label=📜%20License&message=MIT&color=informational)

## Tasks
![tasks](https://raw.githubusercontent.com/ClydeDz/markdown-to-api/main/images/markdowntoapitasks.png)
The extension consists of the following two tasks. You need to add these tasks in this order.
1. Install Markdown to API Dependencies
2. Markdown to API

2. Markdown to API

![tasks](https://raw.githubusercontent.com/ClydeDz/markdown-to-api/main/images/markdowntoapitasks.png)

### Install Markdown to API Dependencies
Add this task before the `Markdown to API` task so all the required dependencies can be installed and ready for use. No inputs required.

![tasks](https://raw.githubusercontent.com/ClydeDz/markdown-to-api/main/images/markdowntoapitasks-install.png)
Add this task before the `Markdown to API` task so all the required dependencies can be installed and ready for use. No inputs required.


### Markdown to API
Add this task to process your Markdown files into JSON files. This task requires one user input - the location of the config file including the name of the file itself. So, in the screenshot below, the JSON config file was located in the `Example1` folder and was named `markdown-to-api.json` hence that's the value that was entered in the field. Remember, you can name the config anything you like, and as long as your config file follows the schema (details below), you should be sweet!

![tasks](https://raw.githubusercontent.com/ClydeDz/markdown-to-api/main/images/markdowntoapitasks-process.png)
Add this task to process your Markdown files into JSON files. This task requires one user input - the location of the config file including the name of the file itself. So, in the screenshot above, the JSON config file was located in the `Example1` folder and was named `markdown-to-api.json` hence that's the value that was entered in the field. Remember, you can name the config anything you like, and as long as your config file follows the schema (details below), you should be sweet!

You can organise your Markdown files as you like. You can also add FrontMatter to each Markdown file. This task will convert each Markdown file into a JSON file and maintain the same folder structure in the output directory. It will also generate a summary JSON file which will contain the details of all Markdown files in a single JSON file.

#### Schema of the config file
The following JSON properties are expected in the config file.

Expand All @@ -44,7 +50,7 @@ The following JSON properties are expected in the config file.
Find more information on the usage and different scenarios in [this GitHub repository](https://github.com/ClydeDz/markdown-to-api-examples).

## Support
The easiest way is to [create an issue](https://github.com/ClydeDz/markdown-to-api/issues/new/choose) in the GitHub repository.
The easiest way is to [create an issue](https://github.com/ClydeDz/markdown-to-api/issues/new/choose) on GitHub.

## Credits
This extension is developed by [Clyde D'Souza](https://twitter.com/clydedz).
Expand Down
1 change: 1 addition & 0 deletions src/install/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ function run() {
}
}

// Starts here
run();
4 changes: 2 additions & 2 deletions src/install/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"author": "Clyde D'Souza",
"version": {
"Major": 0,
"Minor": 2,
"Patch": 1
"Minor": 3,
"Patch": 0
},
"instanceNameFormat": "Install Markdown to API Dependencies",
"execution": {
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "markdown-to-api",
"version": "1.0.0",
"description": "Generate JSON files from Markdown files which can then be consumed by your frontend app. Basically, a static API generator.",
"description": "Generate JSON files from Markdown files which can then be consumed by your front-end app. Basically, a static API generator.",
"main": "index.js",
"scripts": {
"test": "mocha tests/*.test.js --reporter mocha-junit-reporter --timeout 10000 --exit",
Expand Down
1 change: 1 addition & 0 deletions src/process/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ function run() {
}
}

// Starts here
run();
6 changes: 3 additions & 3 deletions src/process/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"id": "5a00c9ee-cdb8-4bdb-a3af-97137d8355ba",
"name": "markdown-to-api",
"friendlyName": "Markdown to API",
"description": "Generate JSON files from Markdown files which can then be consumed by your frontend app. Basically, a static API generator.",
"description": "Generate JSON files from Markdown files which can then be consumed by your front-end app. Basically, a static API generator.",
"helpMarkDown": "[More information](https://github.com/ClydeDz/markdown-to-api#markdown-to-api-1)",
"category": "Utility",
"author": "Clyde D'Souza",
"version": {
"Major": 0,
"Minor": 2,
"Patch": 1
"Minor": 3,
"Patch": 0
},
"instanceNameFormat": "Execute Markdown to API",
"inputs": [
Expand Down
8 changes: 3 additions & 5 deletions vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
"manifestVersion": 1,
"id": "markdown-to-api",
"name": "Markdown to API",
"version": "0.2.1",
"version": "0.3.0",
"publisher": "clydedsouza",
"galleryFlags": [
"Preview"
],
"public": true,
"targets": [
{
"id": "Microsoft.VisualStudio.Services"
}
],
"description": "Generate JSON files from Markdown files which can then be consumed by your frontend app. Basically, a static API generator.",
"description": "Generate JSON files from Markdown files which can then be consumed by your front-end app. Basically, a static API generator.",
"categories": [
"Azure Pipelines"
],
Expand Down

0 comments on commit cc06101

Please sign in to comment.