-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dmd now prints a warning if a malformed input data edge case is detec…
…ted. #89 Fixes a 'maximum call stack size exceeded' error.
- Loading branch information
Showing
8 changed files
with
337 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const FileSet = require('file-set') | ||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
const fileSet = new FileSet() | ||
|
||
async function start () { | ||
await fileSet.add('./partials/**/*.hbs') | ||
const map = new Map() | ||
for (const file of fileSet.files) { | ||
map.set( | ||
path.basename(file, '.hbs'), | ||
fs.readFileSync(file, 'utf8') || '' | ||
) | ||
} | ||
console.log('module.exports = ' + JSON.stringify(Array.from(map), null, ' ')) | ||
} | ||
start() | ||
|
||
/* | ||
node bin/generate-partial-cache.js > partials/partial-cache.js | ||
*/ |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.