Fixed snippet archiver build and generated README
This commit is contained in:
@ -26,7 +26,7 @@ if(isTravisCI() && (process.env['TRAVIS_EVENT_TYPE'] === 'cron' || process.env['
|
|||||||
.readdirSync(SNIPPETS_ARCHIVE_PATH)
|
.readdirSync(SNIPPETS_ARCHIVE_PATH)
|
||||||
.sort((a, b) => a.toLowerCase() - b.toLowerCase());
|
.sort((a, b) => a.toLowerCase() - b.toLowerCase());
|
||||||
// Store the data read from each snippet in the appropriate object
|
// Store the data read from each snippet in the appropriate object
|
||||||
for (const name of snippetFilenames) {
|
for (const name of snippetFilenames.filter(s => s !== 'README.md')) {
|
||||||
snippets[name] = fs.readFileSync(path.join(SNIPPETS_ARCHIVE_PATH, name), 'utf8');
|
snippets[name] = fs.readFileSync(path.join(SNIPPETS_ARCHIVE_PATH, name), 'utf8');
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@ -44,7 +44,7 @@ These snippets, while useful and interesting, didn\'t quite make it into the rep
|
|||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
`
|
`
|
||||||
for(const snippet of Object.entries(snippets).filter(s => s[0] !== 'README.md'))
|
for(const snippet of Object.entries(snippets))
|
||||||
output += `* [\`${snippet[0].slice(0,-3)}\`](#${snippet[0].toLowerCase().slice(0,-3)})\n`;
|
output += `* [\`${snippet[0].slice(0,-3)}\`](#${snippet[0].toLowerCase().slice(0,-3)})\n`;
|
||||||
output += '\n---\n';
|
output += '\n---\n';
|
||||||
for(const snippet of Object.entries(snippets)){
|
for(const snippet of Object.entries(snippets)){
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user