added browserify

This commit is contained in:
Phil Kunz
2015-10-24 18:26:41 +02:00
parent 17ec976987
commit cfc31ce0d7
7 changed files with 198 additions and 61 deletions

View File

@ -1,12 +1,13 @@
/// <reference path="typings/tsd.d.ts" />
/// <reference path="./typings/tsd.d.ts" />
/// <reference path="./modulebrowserify.ts" />
var through = require("through2");
var path = require("path");
var browserify = require("browserify");
module.exports = (jadeTemplate,mojo = undefined) => {
//create the return object
var gulpBrowser:any = {};
return through.obj((file, enc, cb) => {
//run callback function to signal end of plugin process.
return cb(null, file);
});
};
gulpBrowser.browserify = GulpBrowserBrowserify.init();
module.exports = gulpBrowser;

17
ts/modulebrowserify.ts Normal file
View File

@ -0,0 +1,17 @@
module GulpBrowserBrowserify {
export function init() {
return function() {
//this is the trough object that gets returned by gulpBrowser.browserify();
return through.obj((file, enc, cb) => {
var content = file.content;
var basedir = file.base;
//run callback function to signal end of plugin process.
return cb(null, file);
});
};
}
}