Hey there looks like the doc is a bit old regarding the code.
This part:
options.generate
Type: function
Default: (seed, files) => files.reduce((manifest, {name, path}) => ({...manifest, [name]: path}), seed)
All entries in files correspond to the object structure described in the Hooks Options section.
Create the manifest. It can return anything as long as it's serialisable by JSON.stringify. more details
No longer exist but the options.reduce function with the options.seed complementary exists.
We should write:
options.reduce
Type: function
Default: (manifest, {name, path}) => ({...manifest, [name]: path})
Create the manifest. It can return anything as long as it's serialisable by JSON.stringify. more details
with
options.seed
Type: object
Default: {}
Init the initial object used by options.reduce. Override it for adding previous data to your manifest.
Hey there looks like the doc is a bit old regarding the code.
This part:
No longer exist but the
options.reduce
function with theoptions.seed
complementary exists.We should write:
with
Hope it helps ;)