mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
Add namespace to gulp-rename to make export work
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
import gulp = require("gulp");
|
||||
import rename = require("gulp-rename");
|
||||
|
||||
// Test that new import syntax works
|
||||
import * as newRename from 'gulp-rename';
|
||||
|
||||
// rename via string
|
||||
gulp.src("./src/main/text/hello.txt")
|
||||
.pipe(rename("main/text/ciao/goodbye.md"))
|
||||
@@ -26,4 +29,4 @@ gulp.src("./src/main/text/hello.txt", { base: process.cwd() })
|
||||
suffix: "-hola",
|
||||
extname: ".md"
|
||||
}))
|
||||
.pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/bonjour-aloha-hola.md
|
||||
.pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/bonjour-aloha-hola.md
|
||||
|
||||
Vendored
+8
-1
@@ -20,5 +20,12 @@ declare module "gulp-rename" {
|
||||
function rename(name: string): NodeJS.ReadWriteStream;
|
||||
function rename(callback: (path: ParsedPath) => any): NodeJS.ReadWriteStream;
|
||||
function rename(opts: Options): NodeJS.ReadWriteStream;
|
||||
|
||||
/**
|
||||
* This is required as per:
|
||||
* https://github.com/Microsoft/TypeScript/issues/5073
|
||||
*/
|
||||
namespace rename {}
|
||||
|
||||
export = rename;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user