1 | /// <reference types="node"/>
|
2 |
|
3 | interface IDestinationOption {
|
4 | /**
|
5 | * Path to destination directory or file.
|
6 | */
|
7 | dest: string;
|
8 | }
|
9 |
|
10 | interface IExtOption {
|
11 | /**
|
12 | * Source files will be matched to destination files with the provided extension.
|
13 | */
|
14 | ext: string;
|
15 | }
|
16 |
|
17 | interface IMapOption {
|
18 | /**
|
19 | * Map relative source paths to relative destination paths.
|
20 | */
|
21 | map: (relativePath: string) => string;
|
22 | }
|
23 |
|
24 | interface IExtraOption {
|
25 | /**
|
26 | * An extra file, file glob, or list of extra files and/or globs, to check for updated time stamp(s).
|
27 | * If any of these files are newer than the destination files, then all source files will be passed into the stream.
|
28 | */
|
29 | extra?: string | string[];
|
30 | }
|
31 |
|
32 | type ValidOptionPermutations =
|
33 | | (IDestinationOption & Partial<IExtOption> & Partial<IMapOption>)
|
34 | | (Partial<IDestinationOption> & Partial<IExtOption> & IMapOption);
|
35 |
|
36 | type IOptions = IExtraOption & ValidOptionPermutations;
|
37 |
|
38 | interface IGulpNewer {
|
39 | /**
|
40 | * Create a transform stream that passes through files whose modification time
|
41 | * is more recent than the corresponding destination file's modification time.
|
42 | * @param dest Path to destination directory or file.
|
43 | */
|
44 | (dest: string): NodeJS.ReadWriteStream;
|
45 |
|
46 | /**
|
47 | * Create a transform stream that passes through files whose modification time
|
48 | * is more recent than the corresponding destination file's modification time.
|
49 | */
|
50 | (options: IOptions): NodeJS.ReadWriteStream;
|
51 | }
|
52 |
|
53 | declare const newer: IGulpNewer;
|
54 | export = newer;
|