This commit is contained in:
2016-02-01 02:28:43 +01:00
parent 3e46c8c927
commit 6a884cda78
14 changed files with 169401 additions and 4288 deletions

View File

@ -1,9 +1,9 @@
/// <reference path="./typings/main.d.ts" />
console.log("**** starting test ****");
var plugins = {
beautylog: require("beautylog"),
gulp: require("gulp"),
gulpBrowser: require("./index.js"),
gulpBrowser: require("../index.js"),
gulpCallFunction: require("gulp-callfunction")
};
@ -14,16 +14,17 @@ var pipeWorked = function() {
plugins.beautylog.log('Now trying to browserify a testfile...');
plugins.gulp.task('gulpBrowserTest',function(cb) {
var stream = plugins.gulp.src('./test/browserifyGulpTest.js')
var stream = plugins.gulp.src('./testassets/browserifyGulpTest.js')
.pipe(plugins.gulpBrowser.browserify())
.pipe(plugins.gulp.dest("./test/result/"))
.pipe(plugins.gulp.dest("./testassets/result/"))
.pipe(plugins.gulpCallFunction(pipeWorked));
return stream;
});
plugins.gulp.task('gulpBrowserTestError',function(cb) {
var stream = plugins.gulp.src('./test/browserifyGulpTestError.js')
plugins.beautylog.info("Expecting an error:");
var stream = plugins.gulp.src('./testassets/browserifyGulpTestError.js')
.pipe(plugins.gulpBrowser.browserify())
.pipe(plugins.gulp.dest("./test/result/"))
.pipe(plugins.gulp.dest("./testassets/result/"))
.pipe(plugins.gulpCallFunction(pipeWorked));
return stream;
});

View File

@ -1,2 +0,0 @@
/// <reference path="browser/ambient/browserify/browserify.d.ts" />
/// <reference path="browser/ambient/node/node.d.ts" />

View File

@ -1,42 +0,0 @@
// Compiled using typings@0.6.3
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/3191f6e0088eee07c4d8fd24e4d27a40a60d9eb9/browserify/browserify.d.ts
// Type definitions for Browserify
// Project: http://browserify.org/
// Definitions by: Andrew Gaspar <https://github.com/AndrewGaspar/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface BrowserifyObject extends NodeJS.EventEmitter {
add(file:string, opts?:any): BrowserifyObject;
require(file:string, opts?:{
expose: string;
}): BrowserifyObject;
bundle(opts?:{
insertGlobals?: boolean;
detectGlobals?: boolean;
debug?: boolean;
standalone?: string;
insertGlobalVars?: any;
}, cb?:(err:any, src:any) => void): NodeJS.ReadableStream;
external(file:string, opts?:any): BrowserifyObject;
ignore(file:string, opts?:any): BrowserifyObject;
transform(tr:string, opts?:any): BrowserifyObject;
transform(tr:Function, opts?:any): BrowserifyObject;
plugin(plugin:string, opts?:any): BrowserifyObject;
plugin(plugin:Function, opts?:any): BrowserifyObject;
}
interface Browserify {
(): BrowserifyObject;
(files:string[]): BrowserifyObject;
(opts:{
entries?: string[];
noParse?: string[];
}): BrowserifyObject;
}
declare module "browserify" {
var browserify: Browserify;
export = browserify;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +0,0 @@
/// <reference path="main/ambient/browserify/browserify.d.ts" />
/// <reference path="main/ambient/node/node.d.ts" />

View File

@ -1,42 +0,0 @@
// Compiled using typings@0.6.3
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/3191f6e0088eee07c4d8fd24e4d27a40a60d9eb9/browserify/browserify.d.ts
// Type definitions for Browserify
// Project: http://browserify.org/
// Definitions by: Andrew Gaspar <https://github.com/AndrewGaspar/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface BrowserifyObject extends NodeJS.EventEmitter {
add(file:string, opts?:any): BrowserifyObject;
require(file:string, opts?:{
expose: string;
}): BrowserifyObject;
bundle(opts?:{
insertGlobals?: boolean;
detectGlobals?: boolean;
debug?: boolean;
standalone?: string;
insertGlobalVars?: any;
}, cb?:(err:any, src:any) => void): NodeJS.ReadableStream;
external(file:string, opts?:any): BrowserifyObject;
ignore(file:string, opts?:any): BrowserifyObject;
transform(tr:string, opts?:any): BrowserifyObject;
transform(tr:Function, opts?:any): BrowserifyObject;
plugin(plugin:string, opts?:any): BrowserifyObject;
plugin(plugin:Function, opts?:any): BrowserifyObject;
}
interface Browserify {
(): BrowserifyObject;
(files:string[]): BrowserifyObject;
(opts:{
entries?: string[];
noParse?: string[];
}): BrowserifyObject;
}
declare module "browserify" {
var browserify: Browserify;
export = browserify;
}

File diff suppressed because it is too large Load Diff