added browserify
This commit is contained in:
17
ts/index.ts
17
ts/index.ts
@ -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
17
ts/modulebrowserify.ts
Normal 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);
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user