Closed andrewvy closed 9 years ago
That's what they're supposed to be used for!
That way we can buffer and mark files that contain partials as we're reading them from the file, rather than importing all files into memory.
How we can do this:
We skip reading the partials folder/files until we've properly marked the other files. Then, we read the partials and inject them where we need to.
READ index.html Found partial header.html at line 2
index.html
header.html
READ partials/header.html partials/header.html is needed at index.html line 2 REPLACE index.html buffer at line 2 with contents of partials/header.html
partials/header.html
:+1: it is done, started with https://github.com/andrewvy/nima/commit/8ff1bee418cdebccf39191d9d7f5ba1ad2b5e7e1
That's what they're supposed to be used for!
That way we can buffer and mark files that contain partials as we're reading them from the file, rather than importing all files into memory.
How we can do this:
We skip reading the partials folder/files until we've properly marked the other files. Then, we read the partials and inject them where we need to.
READ
index.html
Found partialheader.html
at line 2READ
partials/header.html
partials/header.html
is needed atindex.html
line 2 REPLACEindex.html
buffer at line 2 with contents ofpartials/header.html