You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a metalsmith.static('media/**') method with a signature similar to metalsmith.ignore would allow metalsmith to use native NodeJs fs.copyFile to do a pass-through file copy, which would avoid overhead from reading files into memory that are then not even processed.
TBD whether files matched with metalsmith.static should figure as object keys in the Files object.
If they do, they must not have valid files as values. Still this might break backwards-compatibility with some plugins.
'copiedFile.zip': {}//or'copiedFile.zip': null
So a better option would perhaps be to have metalsmith.static() (without arguments) return the list of matches (so plugins know exactly which files will be/ have been copied over)
In any case a test is needed with a large file to see the effect on perf & interoperability
Note: aligning metalsmith.ignores() to return the ignored matches (instead of the existing & equally accessible ignores property)
The text was updated successfully, but these errors were encountered:
Adding a
metalsmith.static('media/**')
method with a signature similar tometalsmith.ignore
would allow metalsmith to use native NodeJsfs.copyFile
to do a pass-through file copy, which would avoid overhead from reading files into memory that are then not even processed.TBD whether files matched with
metalsmith.static
should figure as object keys in theFiles
object.If they do, they must not have valid files as values. Still this might break backwards-compatibility with some plugins.
So a better option would perhaps be to have
metalsmith.static()
(without arguments) return the list of matches (so plugins know exactly which files will be/ have been copied over)In any case a test is needed with a large file to see the effect on perf & interoperability
Note: aligning
metalsmith.ignores()
to return the ignored matches (instead of the existing & equally accessibleignores
property)The text was updated successfully, but these errors were encountered: