small TypeScript change

This commit is contained in:
Philipp Kunz 2016-05-13 18:20:07 +00:00
parent 80223dc038
commit 7cd695fc92
3 changed files with 4 additions and 5 deletions

View File

@ -1,2 +1,2 @@
declare let browserify: (transforms: any) => any;
declare let browserify: (transforms?: any[]) => any;
export = browserify;

View File

@ -2,7 +2,7 @@
/// <reference path="./typings/main.d.ts" />
var plugins = require("./gulpbrowser.plugins");
var browserify = function (transforms) {
transforms = transforms || [];
if (transforms === void 0) { transforms = []; }
if (!Array.isArray(transforms)) {
transforms = [transforms];
}
@ -43,4 +43,4 @@ var browserify = function (transforms) {
};
module.exports = browserify;
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImd1bHBicm93c2VyLmJyb3dzZXJpZnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDRDQUE0QztBQUM1QyxJQUFPLE9BQU8sV0FBVyx1QkFBdUIsQ0FBQyxDQUFDO0FBR2xELElBQUksVUFBVSxHQUFJLFVBQVMsVUFBVTtJQUVqQyxVQUFVLEdBQUcsVUFBVSxJQUFJLEVBQUUsQ0FBQztJQUM5QixFQUFFLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzdCLFVBQVUsR0FBRyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0lBQzlCLENBQUM7SUFFRCxJQUFJLE9BQU8sR0FBRyxVQUFTLElBQUksRUFBRSxHQUFHLEVBQUUsRUFBRTtRQUVoQyxJQUFJLGNBQWMsR0FBRyxVQUFTLEdBQUcsRUFBRSxlQUFlO1lBQzlDLEVBQUUsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsZUFBZSxDQUFDLENBQUMsQ0FBQSxDQUFDO2dCQUNsQyxJQUFJLENBQUMsUUFBUSxHQUFHLGVBQWUsQ0FBQztZQUNwQyxDQUFDO1l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YWxsYmFjayBmb3Igd2hlbiBicm93c2VyaWZ5IGlzIGZpbmlzaGVkXG4gICAgICAgICAgICBpZiAoQnVmZmVyLmlzQnVmZmVyKGJ1ZmZlcmVkQ29udGVudCkpe1xuICAgICAgICAgICAgICAgIGZpbGUuY29udGVudHMgPSBidWZmZXJlZENvbnRlbnQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHBsdWdpbnMuYmVhdXR5bG9nLmVycm9yKFwiZ3VscC1icm93c2VyOiAuYnJvd3NlcmlmeSgpIFwiICsgZXJyLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIGNiKG5ldyBFcnJvcihlcnIubWVzc2FnZSksZmlsZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2IobnVsbCxmaWxlKTtcbiAgICAgICAgfTtcblxuICAgICAgICBpZihmaWxlLmNvbnRlbnRzLmxlbmd0aCA+IDApe1xuICAgICAgICAgICAgbGV0IGJyb3dzZXJpZmllZCA9IHBsdWdpbnMuYnJvd3NlcmlmeShmaWxlLCB7IGJhc2VkaXI6IGZpbGUuYmFzZSB9KTtcblxuICAgICAgICAgICAgdHJhbnNmb3Jtcy5mb3JFYWNoKGZ1bmN0aW9uICh0cmFuc2Zvcm0pIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHRyYW5zZm9ybSA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgICBicm93c2VyaWZpZWQudHJhbnNmb3JtKHRyYW5zZm9ybSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYnJvd3NlcmlmaWVkLnRyYW5zZm9ybSh0cmFuc2Zvcm0udHJhbnNmb3JtLCB0cmFuc2Zvcm0ub3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGJyb3dzZXJp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gICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBicm93c2VyaWZpZWQudHJhbnNmb3JtKHRyYW5zZm9ybS50cmFuc2Zvcm0sIHRyYW5zZm9ybS5vcHRpb25zKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgYnJvd3NlcmlmaWVkLmJ1bmRsZShidW5kbGVDYWxsYmFjayk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBwbHVnaW5zLmJlYXV0eWxvZy53YXJuKFwiZ3VscC1icm93c2VyOiAuYnJvd3NlcmlmeSgpIGZpbGUuY29udGVudHMgYXBwZWFycyB0byBiZSBlbXB0eVwiKTtcbiAgICAgICAgICAgIGNiKG51bGwsZmlsZSk7XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgbGV0IGF0RW5kID0gZnVuY3Rpb24oY2Ipe1xuICAgICAgICBjYigpO1xuICAgIH0gLy8gbm8gbmVlZCB0byBjbGVhbiB1cCBhZnRlciBvdXJzZWx2ZXNcblxuICAgIHJldHVybiBwbHVnaW5zLnRocm91Z2gub2JqKGZvckVhY2gsYXRFbmQpOyAvLyB0aGlzIGlzIHRoZSB0aHJvdWdoIG9iamVjdCB0aGF0IGdldHMgcmV0dXJuZWQgYnkgZ3VscEJyb3dzZXIuYnJvd3NlcmlmeSgpO1xuIH07XG5cbmV4cG9ydCA9IGJyb3dzZXJpZnk7XG4iXX0=

View File

@ -2,9 +2,8 @@
import plugins = require("./gulpbrowser.plugins");
let browserify = function(transforms) {
let browserify = function(transforms = []) {
transforms = transforms || [];
if (!Array.isArray(transforms)) {
transforms = [transforms];
}