-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
80 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
{ | ||
"extends": ["eslint-config-node-roboleary"] | ||
"extends": ["eslint-config-node-roboleary"], | ||
"env": { | ||
"mocha": true | ||
}, | ||
"settings": { | ||
"import/core-modules": [ "vscode" ] | ||
}, | ||
"rules": { | ||
"node/no-missing-require": ["error", { | ||
"allowModules": [ "vscode"] | ||
}] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// eslint-disable-next-line import/no-unresolved | ||
const vscode = require("vscode"); | ||
const fs = require("fs"); | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* A HTML Table of Contents created from data. | ||
*/ | ||
class TableOfContents { | ||
constructor(data) { | ||
this.data = data; | ||
} | ||
|
||
/** | ||
* Get the Table of Contents as HTML. | ||
*/ | ||
getTableOfContents() { | ||
let html = `<div id="toc"> | ||
<h2>Table of Contents</h2> | ||
<ul> | ||
<li><a href="#project">Project Snippets</a></li>`; | ||
html += this.createTableOfContentsEntry(this.projectIDs); | ||
html += `<li><a href="#user">User Snippets</a></li>`; | ||
html += this.createTableOfContentsEntry(this.userIDs); | ||
html += `<li><a href="#extension">Extension Snippets</a></li>`; | ||
html += this.createTableOfContentsEntry(this.extensionIDs); | ||
html += `<li><a href="#app">VS Code Snippets</a></li>`; | ||
html += this.createTableOfContentsEntry(this.appIDs); | ||
html += `</ul></div>`; | ||
return html; | ||
} | ||
|
||
/** | ||
* Get the Table of Contents entry for Extension snippets as HTML. | ||
*/ | ||
createTableOfContentsEntry(array) { | ||
let html = "<ul>"; | ||
|
||
array.forEach((obj) => { | ||
html += `<li><a href=#${obj.id}>${obj.name}</a>`; | ||
}); | ||
|
||
html += "</ul>"; | ||
|
||
return html; | ||
} | ||
} | ||
|
||
module.exports = TableOfContents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters