From cfc31ce0d72c811a0faaf9f99148aeca3ab6c5c3 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sat, 24 Oct 2015 18:26:41 +0200 Subject: [PATCH] added browserify --- .gitignore | 6 ++ .idea/workspace.xml | 161 ++++++++++++++++++++++++++++++----------- .travis.yml | 19 +++++ index.js | 35 ++++++--- package.json | 4 +- ts/index.ts | 17 +++-- ts/modulebrowserify.ts | 17 +++++ 7 files changed, 198 insertions(+), 61 deletions(-) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 ts/modulebrowserify.ts diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c1b3085 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +node_modules/ +.settings/ +.idea/ + +ts/*.js +ts/*.js.map diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 1c3dab9..caf9835 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,23 +2,12 @@ - - - - - - - - - - - - - - - - - + + + + + + @@ -42,20 +31,32 @@ - - + + + + + + + + + + + + + + - + - + @@ -72,7 +73,27 @@ - + + + + + + + + + + + + + + + + + + + + + @@ -88,6 +109,11 @@ @@ -158,6 +184,24 @@ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c71f5d9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: node_js +before_install: + - nvm install stable + - node -v + - npm -v + - npm install -g gulp + - npm install gulp + - npm install gulp-typescript +deploy: + provider: npm + email: npm@smart-coordination.com + api_key: + secure: y7l1JyBDihAYxbqfuPAUXJfY+PC7RSSCkAtXtBIjPA6wytSBnz55te/Vdy8RFgVty6O/k4hHzrhgUJMSoWKmPuGQ5bMBgkyV9OI5PPp4uEUyy5UdcJZv3cZYpGGDRjLjCHP4pF7AHdRcDUMEiE5ZrDtmUH1SBLoRswieO0TKsiMr3u45yR6rHFoPnnw1YlatoAPpiuP3SLnCrIjQeSOS7y9SL6PpakiquJNtpseVOr60sp39L6vLAeqJ7xTjjNJk23LF/60lfiKtM7QFg9qqE7cxFUWJs7Zmgfg4/hGcU9XRfDfZQgSNntcdFczPejO5juv2KOb1tzH7EhXrWlcF1yd70RBdJbcOn7O6ctHjMCGrCSn6IQPzcNWNErFELfMLsjVQUxbfHSc0iA1JxcYWeXUivrStwVOa9ufuG2KZCQZyEjra3zPdCu9yrE30c/mTace7eJXPYTsNn2tmxvTnFoTWmeQ0xL9Iyz9zceADpxjYJoJ8r4XMDWxWga5G9OPaqCINHxjKhOX0C36YEjYTaeNMNHv6F6BPLdKwQ9SmklMtcyC312nJsXwKy+KYJSoY6WqMef9Zk3ez0o09W0UkSr0qiQkyYCoNm8b1L7VrYuccPH24GE0fn8QMWmeE5TBThYbEIdt6NBoYCDeocflUm5KBrImFGo1peeYS1aQnpoQ= + on: + tags: true + repo: pushrocks/gulp-bootstrap +notifications: + slack: + secure: f5Uss0z9RPl/QcA/DroB8loyE93aOYI6bqCkrsiUscmZtlv/TVQtT4dxqGA6uvcG6iTQDBi3Ul88dQxWkRm4IqbhY35/iMaV2dHW4FVYMAh8GQMbsfL2sALCcufxD9blw47awv3iFcwhV1EeyesscjgL0JIjduk96v/7G/6QIO2838M1lzlgtj+kRUkim8qkaEs1je3gRrhMUIjLuAdscMXyUKYFMjWo9ACSjVUl30R/ZNemb18itIja6i92GotreBgcfEMczvy58ovDC7xdJUsY8LjMI01DwY+WPRnI0tAhsuI8moBwwcdM4e3bAjKjucQRjO33O5bMWRZ6QCiYd0DnCEFyCPQLJ4GSy/tkD00n8ijLHAOSV3AH1zNbdK1EAdSPQXDvlI36KJn/2hyQLoitGHVUPr76ujJWP82ypO2tgIp3XQU0dJVCxDuHnwJO2+hjdI+gCPqxNTpjeujHx3UdkTGNRjuuf9dlZ/D08fApjYxy2fxItTqo3QjP/nrqvBXUOPP8yPHpjIT4H2t5Pr4SJjBGI6X4qhKyFj6s9rA/Xu1rL+45zu1C3uC3z+u3T9UwrbzJ/cZM6r6UQvQmUvIfBNaMlg4I/diQCDIPL+Rhop2nylY3IcHmJnk2itn7kOqj1tohCpFEml5pRuSZy4udWywkdtyBAsHWFLF7oiQ= diff --git a/index.js b/index.js index 67114d9..f46c165 100644 --- a/index.js +++ b/index.js @@ -1,11 +1,24 @@ -/// -var path, through; -through = require("through2"); -path = require("path"); -module.exports = function (jadeTemplate, mojo) { - if (mojo === void 0) { mojo = undefined; } - return through.obj(function (file, enc, cb) { - //run callback function to signal end of plugin process. - return cb(null, file); - }); -}; +var GulpBrowserBrowserify; +(function (GulpBrowserBrowserify) { + function init() { + return function () { + //this is the trough object that gets returned by gulpBrowser.browserify(); + return through.obj(function (file, enc, cb) { + var content = file.content; + var basedir = file.base; + //run callback function to signal end of plugin process. + return cb(null, file); + }); + }; + } + GulpBrowserBrowserify.init = init; +})(GulpBrowserBrowserify || (GulpBrowserBrowserify = {})); +/// +/// +var through = require("through2"); +var path = require("path"); +var browserify = require("browserify"); +//create the return object +var gulpBrowser = {}; +gulpBrowser.browserify = GulpBrowserBrowserify.init(); +module.exports = gulpBrowser; diff --git a/package.json b/package.json index ee57026..5f26b03 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,9 @@ "url": "https://github.com/pushrocks/gulp-browser/issues" }, "homepage": "https://github.com/pushrocks/gulp-browser", - "dependencies": {}, + "dependencies": { + "browserify": "^11.2.0" + }, "devDependencies": { "gulp": "3.9.0", "gulp-typescript": "2.9.2" diff --git a/ts/index.ts b/ts/index.ts index 147677a..1363a48 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,12 +1,13 @@ -/// +/// +/// + 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; diff --git a/ts/modulebrowserify.ts b/ts/modulebrowserify.ts new file mode 100644 index 0000000..5da4070 --- /dev/null +++ b/ts/modulebrowserify.ts @@ -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); + }); + }; + } +} \ No newline at end of file