clean up
This commit is contained in:
parent
3e46c8c927
commit
6a884cda78
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,5 +5,6 @@ npm-debug.log
|
||||
|
||||
ts/*.js
|
||||
ts/*.js.map
|
||||
ts/typings/
|
||||
|
||||
test/result/
|
@ -33,6 +33,6 @@
|
||||
"devDependencies": {
|
||||
"gulp": "3.9.0",
|
||||
"gulp-callfunction": "0.0.10",
|
||||
"npmts": "^2.0.0"
|
||||
"npmts": "^2.0.2"
|
||||
}
|
||||
}
|
||||
|
12
test/test.js
12
test/test.js
@ -1,8 +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")
|
||||
};
|
||||
var pipeWorked = function () {
|
||||
@ -10,16 +11,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;
|
||||
});
|
||||
|
169384
testassets/result/browserifyGulpTest.js
Normal file
169384
testassets/result/browserifyGulpTest.js
Normal file
File diff suppressed because one or more lines are too long
1
testassets/result/browserifyGulpTestError.js
Normal file
1
testassets/result/browserifyGulpTestError.js
Normal file
@ -0,0 +1 @@
|
||||
var myError = require("my-error");
|
13
ts/test.ts
13
ts/test.ts
@ -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;
|
||||
});
|
||||
|
2
ts/typings/browser.d.ts
vendored
2
ts/typings/browser.d.ts
vendored
@ -1,2 +0,0 @@
|
||||
/// <reference path="browser/ambient/browserify/browserify.d.ts" />
|
||||
/// <reference path="browser/ambient/node/node.d.ts" />
|
@ -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;
|
||||
}
|
2094
ts/typings/browser/ambient/node/node.d.ts
vendored
2094
ts/typings/browser/ambient/node/node.d.ts
vendored
File diff suppressed because it is too large
Load Diff
2
ts/typings/main.d.ts
vendored
2
ts/typings/main.d.ts
vendored
@ -1,2 +0,0 @@
|
||||
/// <reference path="main/ambient/browserify/browserify.d.ts" />
|
||||
/// <reference path="main/ambient/node/node.d.ts" />
|
@ -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;
|
||||
}
|
2094
ts/typings/main/ambient/node/node.d.ts
vendored
2094
ts/typings/main/ambient/node/node.d.ts
vendored
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user