From 4d20c6f769c8846ca62ae0577af135ab2969ff8c Mon Sep 17 00:00:00 2001 From: Stephan Troyer Date: Sun, 16 Dec 2018 12:47:38 +0100 Subject: [PATCH 1/2] Fix missing array in Readme The second argument for `generate` should be an array. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4dbe690..3bedde1 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Sort files before they are passed to `generate`. [FileDescriptor typings](#filed ### `options.generate` -Type: `Function(Object, FileDescriptor): Object`
+Type: `Function(Object, FileDescriptor[]): Object`
Default: `(seed, files) => files.reduce((manifest, {name, path}) => ({...manifest, [name]: path}), seed)` Create the manifest. It can return anything as long as it's serialisable by `JSON.stringify`. [FileDescriptor typings](#filedescriptor) From e02014c821abfb82e795956720cdc68060786563 Mon Sep 17 00:00:00 2001 From: Stephan Troyer Date: Sun, 16 Dec 2018 12:52:25 +0100 Subject: [PATCH 2/2] correct sort parameters The sort function should have two separate arguments. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3bedde1..227e13d 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ Modify files details before the manifest is created. [FileDescriptor typings](#f ### `options.sort` -Type: `Function(FileDescriptor): number` +Type: `Function(FileDescriptor, FileDescriptor): number` Sort files before they are passed to `generate`. [FileDescriptor typings](#filedescriptor)