1 | /// <reference types="node"/>
|
2 | /// <reference types="vinyl"/>
|
3 |
|
4 | declare module "gulp-insert" {
|
5 | import File = require("vinyl");
|
6 |
|
7 | interface Transformer {
|
8 | (contents: string, file: File): string;
|
9 | }
|
10 |
|
11 | namespace Insert {
|
12 | /**
|
13 | * Prepends a string onto the contents
|
14 | * @param {string} content
|
15 | * @returns {NodeJS.ReadWriteStream}
|
16 | */
|
17 | function prepend(content: string): NodeJS.ReadWriteStream;
|
18 |
|
19 | /**
|
20 | * Appends a string onto the contents
|
21 | * @param {string} content
|
22 | * @returns {NodeJS.ReadWriteStream}
|
23 | */
|
24 | function append(content: string): NodeJS.ReadWriteStream;
|
25 |
|
26 | /**
|
27 | * Wraps the contents with two strings
|
28 | * @param {string} prepend
|
29 | * @param {string} append
|
30 | * @returns {NodeJS.ReadWriteStream}
|
31 | */
|
32 | function wrap(prepend: string, append: string): NodeJS.ReadWriteStream;
|
33 |
|
34 | /**
|
35 | * Calls a function with the contents of the file
|
36 | * @param {Transformer} transformer
|
37 | * @returns {NodeJS.ReadWriteStream}
|
38 | */
|
39 | function transform(transformer: Transformer): NodeJS.ReadWriteStream;
|
40 | }
|
41 |
|
42 | namespace Insert {}
|
43 | export = Insert;
|
44 | }
|