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