Update build.js
This commit is contained in:
@ -11,10 +11,10 @@ const SNIPPETS_PATH = './snippets';
|
|||||||
const STATIC_PARTS_PATH = './static-parts';
|
const STATIC_PARTS_PATH = './static-parts';
|
||||||
|
|
||||||
const snippets = {};
|
const snippets = {};
|
||||||
const emojis = {
|
const EMOJIS = {
|
||||||
adapter: '🔌',
|
adapter: '🔌',
|
||||||
array: '📚',
|
array: '📚',
|
||||||
browser: '🖥️',
|
browser: '🌐',
|
||||||
date: '⏱️',
|
date: '⏱️',
|
||||||
function: '🎛️',
|
function: '🎛️',
|
||||||
logic: '🔮',
|
logic: '🔮',
|
||||||
@ -102,7 +102,7 @@ try {
|
|||||||
uncategorizedOutput += '\n</details>\n\n';
|
uncategorizedOutput += '\n</details>\n\n';
|
||||||
} else {
|
} else {
|
||||||
output += `### ${
|
output += `### ${
|
||||||
emojis[tag] || ''
|
EMOJIS[tag] || ''
|
||||||
} ${capitalizedTag}\n\n<details>\n<summary>View contents</summary>\n\n`;
|
} ${capitalizedTag}\n\n<details>\n<summary>View contents</summary>\n\n`;
|
||||||
for (const taggedSnippet of Object.entries(tagDbData).filter(v => v[1] === tag)) {
|
for (const taggedSnippet of Object.entries(tagDbData).filter(v => v[1] === tag)) {
|
||||||
output += `* [\`${taggedSnippet[0]}\`](#${taggedSnippet[0].toLowerCase()})\n`;
|
output += `* [\`${taggedSnippet[0]}\`](#${taggedSnippet[0].toLowerCase()})\n`;
|
||||||
@ -125,7 +125,7 @@ try {
|
|||||||
'\n<br>[⬆ back to top](#table-of-contents)\n\n'}`;
|
'\n<br>[⬆ back to top](#table-of-contents)\n\n'}`;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
output += `---\n ## ${emojis[tag] || ''} ${capitalizedTag}\n`;
|
output += `---\n ## ${EMOJIS[tag] || ''} ${capitalizedTag}\n`;
|
||||||
for (const taggedSnippet of Object.entries(tagDbData).filter(v => v[1] === tag)) {
|
for (const taggedSnippet of Object.entries(tagDbData).filter(v => v[1] === tag)) {
|
||||||
let data = snippets[taggedSnippet[0] + '.md'];
|
let data = snippets[taggedSnippet[0] + '.md'];
|
||||||
data =
|
data =
|
||||||
|
|||||||
Reference in New Issue
Block a user