mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Adding a bunch of gulp utilities
This should allow a developer to write a gulpfile in TypeScript to compile a TypeScript project.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
/// <reference path="./gulp-replace.d.ts"/>
|
||||
/// <reference path="../gulp/gulp.d.ts"/>
|
||||
import gulp = require("gulp");
|
||||
import replace = require("gulp-replace");
|
||||
|
||||
gulp.task('templates', function(){
|
||||
gulp.src(['file.txt'])
|
||||
.pipe(replace("test", "foo"))
|
||||
.pipe(replace(/foo(.{3})/g, '$1foo'))
|
||||
.pipe(gulp.dest('build/file.txt'));
|
||||
});
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for gulp-replace
|
||||
// Project: https://github.com/lazd/gulp-replace
|
||||
// Definitions by: Asana <https://asana.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts"/>
|
||||
|
||||
declare module "gulp-replace" {
|
||||
interface Options {
|
||||
skipBinary: boolean;
|
||||
}
|
||||
|
||||
function replace(pattern: string, replacement: string, opts?: Options): NodeJS.ReadWriteStream;
|
||||
function replace(pattern: RegExp, replacement: string, opts?: Options): NodeJS.ReadWriteStream;
|
||||
|
||||
export = replace;
|
||||
}
|
||||
Reference in New Issue
Block a user