Compare commits

...

35 Commits

Author SHA1 Message Date
92ad03fc65 0.0.18 2015-12-06 22:07:59 +01:00
50dd2b193a 0.0.17 2015-12-06 22:07:25 +01:00
fb3e693f2a updated dependencies 2015-12-06 22:07:18 +01:00
92841c1715 fix comment typo 2015-12-05 22:59:22 +01:00
07b6fea447 0.0.16 2015-12-05 22:52:26 +01:00
809a1f7450 improve readme 2015-12-05 22:51:38 +01:00
9e1716cba5 add bithound.io: closes #3 2015-12-05 22:48:02 +01:00
66ac210e5e improve readme 2015-12-05 22:36:11 +01:00
663e8f1984 improve readme 2015-12-05 22:35:41 +01:00
f29bb7ea44 0.0.15 2015-12-05 22:31:28 +01:00
a3584988f7 Integrated error reporting: closes #2 and closes #4 2015-12-05 22:29:06 +01:00
338e1c8497 clean up 2015-12-02 16:27:26 +01:00
0667889820 0.0.14 2015-11-30 12:58:06 +01:00
8e6f59865e updated deps 2015-11-30 12:56:59 +01:00
ad301a55a8 0.0.13 2015-11-19 11:32:55 +01:00
67826ea04b updated deps 2015-11-19 11:32:39 +01:00
1644c3541d 0.0.12 2015-11-13 19:24:33 +01:00
e81fa449bb updated deps 2015-11-13 19:24:25 +01:00
56027509b1 0.0.11 2015-11-01 18:53:43 +01:00
9d19892849 fix 2015-11-01 18:53:37 +01:00
9b082c6b1e update 2015-11-01 18:53:03 +01:00
a1fc66316e pin versions 2015-10-27 17:03:54 +01:00
9387db780b 0.0.10 2015-10-27 16:55:49 +01:00
0d2d49bfce cleanup 2015-10-27 16:55:44 +01:00
b2aba691e2 0.0.9 2015-10-27 16:48:35 +01:00
df3e7faed7 cleanup 2015-10-27 16:48:24 +01:00
22dde42901 0.0.8 2015-10-27 16:47:04 +01:00
f99b7dad41 updated deps, improved README 2015-10-27 16:46:57 +01:00
d456dc45eb added log message 2015-10-26 23:38:29 +01:00
f3c0a766c9 0.0.7 2015-10-26 23:33:31 +01:00
6b6baee746 speed up travis 2015-10-26 23:33:10 +01:00
01cfcb556c 0.0.6 2015-10-26 23:30:56 +01:00
11656abc3f fixed small error 2015-10-26 23:30:48 +01:00
b016b4a709 0.0.5 2015-10-26 23:27:51 +01:00
2069fb92f9 now successfully browfserifying 2015-10-26 23:27:33 +01:00
20 changed files with 155 additions and 476 deletions

3
.gitignore vendored
View File

@ -1,6 +1,9 @@
node_modules/ node_modules/
.settings/ .settings/
.idea/ .idea/
npm-debug.log
ts/*.js ts/*.js
ts/*.js.map ts/*.js.map
test/result/

1
.idea/.name generated
View File

@ -1 +0,0 @@
gulp-browser

6
.idea/encodings.xml generated
View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

13
.idea/misc.xml generated
View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
</project>

8
.idea/modules.xml generated
View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/gulp-browser.iml" filepath="$PROJECT_DIR$/.idea/gulp-browser.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated
View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

386
.idea/workspace.xml generated
View File

@ -1,386 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="b850c661-13d4-478c-951c-1a06c2a6f1db" name="Default" comment="" />
<ignored path="gulp-browser.iws" />
<ignored path=".idea/workspace.xml" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FavoritesManager">
<favorites_list name="gulp-browser" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="index.ts" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/ts/index.ts">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="12" column="54" selection-start-line="12" selection-start-column="54" selection-end-line="12" selection-end-column="54" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="modulebrowserify.ts" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/ts/modulebrowserify.ts">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="11" column="59" selection-start-line="11" selection-start-column="59" selection-end-line="11" selection-end-column="59" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="index.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="28" column="29" selection-start-line="28" selection-start-column="29" selection-end-line="28" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="README.md" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/README.md">
<provider editor-type-id="MarkdownPreviewEditor">
<state />
</provider>
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.32142857">
<caret line="1" column="45" selection-start-line="1" selection-start-column="45" selection-end-line="1" selection-end-column="45" />
<folding />
</state>
</provider>
<provider editor-type-id="MultiMarkdownFxPreviewEditor">
<state />
</provider>
<provider editor-type-id="MultiMarkdownFxHtmlEditor">
<state />
</provider>
</entry>
</file>
<file leaf-file-name="package.json" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="1.1538461">
<caret line="32" column="4" selection-start-line="32" selection-start-column="4" selection-end-line="32" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name=".gitignore" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.8181818">
<caret line="6" column="0" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name=".travis.yml" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="19" column="0" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/.travis.yml" />
<option value="$PROJECT_DIR$/ts/browserify.ts" />
<option value="$PROJECT_DIR$/package.json" />
<option value="$PROJECT_DIR$/ts/index.ts" />
<option value="$PROJECT_DIR$/ts/modulebrowserify.ts" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" />
<component name="JsBuildToolPackageJson" detection-done="true" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
</component>
<component name="ProjectFrameBounds">
<option name="y" value="23" />
<option name="width" value="1440" />
<option name="height" value="873" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="gulp-browser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="gulp-browser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="gulp-browser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="gulp-browser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="gulp-browser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="ts" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scope" />
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="last_opened_file_path" value="$PROJECT_DIR$/../gulp-makejson" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="js-jscs-nodeInterpreter" value="/usr/local/bin/node" />
<property name="HbShouldOpenHtmlAsHb" value="" />
</component>
<component name="RunManager">
<configuration default="true" type="BashConfigurationType" factoryName="Bash">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="INTERPRETER_PATH" value="/bin/bash" />
<option name="WORKING_DIRECTORY" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SCRIPT_NAME" value="" />
<option name="PARAMETERS" value="" />
<module name="" />
<envs />
<method />
</configuration>
<configuration default="true" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application">
<method />
</configuration>
<configuration default="true" type="DartUnitRunConfigurationType" factoryName="DartUnit">
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerKarma" factoryName="Karma" config-file="">
<envs />
<method />
</configuration>
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
<method />
</configuration>
<configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" working-dir="">
<method />
</configuration>
<configuration default="true" type="cucumber.js" factoryName="Cucumber.js">
<option name="cucumberJsArguments" value="" />
<option name="executablePath" />
<option name="filePath" />
<method />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<method />
</configuration>
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
<command value="run-script" />
<scripts />
<envs />
<method />
</configuration>
<configuration default="true" type="mocha-javascript-test-runner" factoryName="Mocha">
<node-options />
<working-directory>$PROJECT_DIR$</working-directory>
<pass-parent-env>true</pass-parent-env>
<envs />
<ui>bdd</ui>
<extra-mocha-options />
<test-kind>DIRECTORY</test-kind>
<test-directory />
<recursive>false</recursive>
<method />
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false" />
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="b850c661-13d4-478c-951c-1a06c2a6f1db" name="Default" comment="" />
<created>1445697437394</created>
<option name="number" value="Default" />
<updated>1445697437394</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="873" extended-state="0" />
<editor active="false" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24947146" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="TypeScript Compiler" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.33034572" sideWeight="0.5024665" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.33034572" sideWeight="0.49753347" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/README.md">
<provider editor-type-id="MarkdownPreviewEditor">
<state />
</provider>
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.32142857">
<caret line="1" column="45" selection-start-line="1" selection-start-column="45" selection-end-line="1" selection-end-column="45" />
<folding />
</state>
</provider>
<provider editor-type-id="MultiMarkdownFxPreviewEditor">
<state />
</provider>
<provider editor-type-id="MultiMarkdownFxHtmlEditor">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.8181818">
<caret line="6" column="0" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="19" column="0" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/ts/compile/gulpfile.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="28" column="29" selection-start-line="28" selection-start-column="29" selection-end-line="28" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/ts/tsd.json">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/ts/index.ts">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="12" column="54" selection-start-line="12" selection-start-column="54" selection-end-line="12" selection-end-column="54" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/ts/modulebrowserify.ts">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="11" column="59" selection-start-line="11" selection-start-column="59" selection-end-line="11" selection-end-column="59" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="1.1538461">
<caret line="32" column="4" selection-start-line="32" selection-start-column="4" selection-end-line="32" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
</component>
</project>

View File

@ -1,11 +1,8 @@
language: node_js language: node_js
node_js:
- "4.1"
before_install: before_install:
- nvm install stable - npm install -g tsd
- node -v
- npm -v
- npm install -g gulp
- npm install gulp
- npm install gulp-typescript
deploy: deploy:
provider: npm provider: npm
email: npm@smart-coordination.com email: npm@smart-coordination.com

View File

@ -1,2 +1,31 @@
# gulp-browser # gulp-browser
bundles browserify and other goodies for gulp browserify and other goodies for gulp
### Build Status/Dependencies
[![Build Status](https://travis-ci.org/pushrocks/gulp-browser.svg?branch=master)](https://travis-ci.org/pushrocks/gulp-browser)
[![Dependency Status](https://david-dm.org/pushrocks/gulp-browser.svg)](https://david-dm.org/pushrocks/gulp-browser)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/gulp-browser/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/gulp-browser/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/gulp-browser/badges/code.svg)](https://www.bithound.io/github/pushrocks/gulp-browser)
### Usage
gulp-browser is meant to be easy:
#### Browserify:
```javascript
var gulp = require("gulp");
var gulpBrowser = require("gulp-browser");
gulp.task('gulpBrowserTest',function() {
var stream = gulp.src('./test/*.js')
.pipe(gulpBrowser.browserify())
.pipe(gulp.dest("./test/browserifiedJS/"));
return stream;
});
```
> **Note:** Be aware of how gulp.src creates values of file.base and file.path since that is important to the require statements.
### Dev Information:
[![devDependency Status](https://david-dm.org/pushrocks/gulp-browser/dev-status.svg)](https://david-dm.org/pushrocks/gulp-browser#info=devDependencies)
[![bitHound Dev Dependencies](https://www.bithound.io/github/pushrocks/gulp-browser/badges/devDependencies.svg)](https://www.bithound.io/github/pushrocks/gulp-browser/master/dependencies/npm)

View File

@ -3,15 +3,18 @@ var GulpBrowserBrowserify;
(function (GulpBrowserBrowserify) { (function (GulpBrowserBrowserify) {
function init() { function init() {
return function () { return function () {
//this is the trough object that gets returned by gulpBrowser.browserify();
return through.obj(function (file, enc, cb) { return through.obj(function (file, enc, cb) {
var content = String(file.contents); var bundleCallback = function (err, bufferedContent) {
var basedir = file.base; if (Buffer.isBuffer(bufferedContent)) {
var bundleCallback = function (err, bundledBuffer) { file.contents = bufferedContent;
}
else {
pr.beautylog.error("gulp-browser: .browserify() " + err.message);
}
cb(null, file);
}; };
browserify(content).bundle(bundleCallback); browserify(file)
//run callback function to signal end of plugin process. .bundle(bundleCallback);
return cb(null, file);
}); });
}; };
} }
@ -20,6 +23,7 @@ var GulpBrowserBrowserify;
/// <reference path="./typings/tsd.d.ts" /> /// <reference path="./typings/tsd.d.ts" />
/// <reference path="./modulebrowserify.ts" /> /// <reference path="./modulebrowserify.ts" />
var through = require("through2"); var through = require("through2");
var gutil = require("gulp-util");
var path = require("path"); var path = require("path");
var browserify = require("browserify"); var browserify = require("browserify");
var pr = require("pushrocks"); var pr = require("pushrocks");

View File

@ -1,13 +1,14 @@
{ {
"name": "gulp-browser", "name": "gulp-browser",
"version": "0.0.4", "version": "0.0.18",
"description": "bundles browserify and other goodies for gulp", "description": "browserify and other goodies for gulp",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "(cd ts/compile && gulp)", "test": "(cd ts/compile && node compile.js) && (node test.js)",
"reinstall": "(rm -r node_modules && npm install)", "reinstall": "(rm -r node_modules && npm install)",
"release": "(git pull origin master && npm version patch && git push origin master && git checkout release && git merge master && git push origin release && git checkout master)", "release": "(git pull origin master && npm version patch && git push origin master && git checkout release && git merge master && git push origin release && git checkout master)",
"startdev": "(git checkout master && git pull origin master)" "update": "(git checkout master && git pull origin master && npm install)",
"upgrade": "(npm run update) && (ncu upgradeAll && npm install)"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -25,13 +26,15 @@
}, },
"homepage": "https://github.com/pushrocks/gulp-browser", "homepage": "https://github.com/pushrocks/gulp-browser",
"dependencies": { "dependencies": {
"browserify": "^11.2.0", "browserify": "12.0.1",
"gutil": "^1.6.4", "gulp-util": "3.0.7",
"pushrocks": "^1.0.18", "pushrocks": "1.0.24",
"through2": "^2.0.0" "through2": "2.0.0"
}, },
"devDependencies": { "devDependencies": {
"beautylog": "1.0.6",
"gulp": "3.9.0", "gulp": "3.9.0",
"gulp-typescript": "2.9.2" "gulp-callfunction": "0.0.10",
"gulp-typescript": "2.10.0"
} }
} }

27
test.js Normal file
View File

@ -0,0 +1,27 @@
/// <reference path="./typings/tsd.d.ts" />
var gulp = require("gulp");
var gulpBrowser = require("./index.js");
var pr = require("pushrocks");
var gulpCallFunction = require("gulp-callfunction");
var pipeWorked = function () {
pr.beautylog.info("Pipe didn't break! Ready for Primetime!");
};
pr.beautylog.log('Now trying to browserify a testfile...');
gulp.task('gulpBrowserTest', function (cb) {
var stream = gulp.src('./test/browserifyGulpTest.js')
.pipe(gulpBrowser.browserify())
.pipe(gulp.dest("./test/result/"))
.pipe(gulpCallFunction(pipeWorked));
return stream;
});
gulp.task('gulpBrowserTestError', function (cb) {
var stream = gulp.src('./test/browserifyGulpTestError.js')
.pipe(gulpBrowser.browserify())
.pipe(gulp.dest("./test/result/"))
.pipe(gulpCallFunction(pipeWorked));
return stream;
});
gulp.task("default", ['gulpBrowserTest', 'gulpBrowserTestError'], function () {
pr.beautylog.success("Test passed!");
});
gulp.start.apply(gulp, ['default']);

View File

@ -0,0 +1,2 @@
var beautylog = require("beautylog");
beautylog.log("it works");

View File

@ -0,0 +1 @@
var myError = require("my-error");

27
ts/compile/compile.js Normal file
View File

@ -0,0 +1,27 @@
// import gulp
var gulp = require("gulp")
var gulpTypescript = require("gulp-typescript");
var pr = require("pushrocks");
gulp.task('compileTS', function() {
var stream = gulp.src('../index.ts')
.pipe(gulpTypescript({
out: "index.js"
}))
.pipe(gulp.dest("../../"));
return stream;
});
gulp.task('compileTestTS', function() {
var stream = gulp.src('../test.ts')
.pipe(gulpTypescript({
out: "test.js"
}))
.pipe(gulp.dest("../../"));
return stream;
});
gulp.task('default',['compileTS','compileTestTS'], function() {
pr.beautylog.success('Typescript compiled');
});
gulp.start.apply(gulp, ['default']);

View File

@ -1,2 +0,0 @@
nvm use v0.12.7
gulp

View File

@ -1,16 +0,0 @@
// import gulp
var gulp = require("gulp"),
gulpTypescript = require("gulp-typescript");
gulp.task('compileTS', function() {
var stream = gulp.src('../index.ts')
.pipe(gulpTypescript({
out: "index.js"
}))
.pipe(gulp.dest("../../"));
return stream;
});
gulp.task('default',['compileTS'], function() {
console.log('Typescript compiled');
});

View File

@ -2,14 +2,17 @@
module GulpBrowserBrowserify { module GulpBrowserBrowserify {
export function init() { export function init() {
return function() { return function() {
return through.obj((file, enc, cb) => { //this is the trough object that gets returned by gulpBrowser.browserify(); return through.obj((file, enc, cb) => { //this is the through object that gets returned by gulpBrowser.browserify();
var content = String(file.contents); // get the content of the file var bundleCallback = function(err, bufferedContent) {
var bundleCallback = (err,bundledBuffer) => { //gets called by browserify, arrow function (TS) preserves this if (Buffer.isBuffer(bufferedContent)){
file.contents = bundledBuffer; file.contents = bufferedContent;
this.push(file); } else {
cb(); pr.beautylog.error("gulp-browser: .browserify() " + err.message);
}
cb(null,file);
}; };
browserify(content).bundle(bundleCallback); browserify(file)
.bundle(bundleCallback)
}); });
}; };
} }

29
ts/test.ts Normal file
View File

@ -0,0 +1,29 @@
/// <reference path="./typings/tsd.d.ts" />
var gulp = require("gulp");
var gulpBrowser = require("./index.js");
var pr = require("pushrocks");
var gulpCallFunction = require("gulp-callfunction");
var pipeWorked = function() {
pr.beautylog.info("Pipe didn't break! Ready for Primetime!");
};
pr.beautylog.log('Now trying to browserify a testfile...');
gulp.task('gulpBrowserTest',function(cb) {
var stream =gulp.src('./test/browserifyGulpTest.js')
.pipe(gulpBrowser.browserify())
.pipe(gulp.dest("./test/result/"))
.pipe(gulpCallFunction(pipeWorked));
return stream;
});
gulp.task('gulpBrowserTestError',function(cb) {
var stream = gulp.src('./test/browserifyGulpTestError.js')
.pipe(gulpBrowser.browserify())
.pipe(gulp.dest("./test/result/"))
.pipe(gulpCallFunction(pipeWorked));
return stream;
});
gulp.task("default",['gulpBrowserTest','gulpBrowserTestError'],function(){
pr.beautylog.success("Test passed!");
});
gulp.start.apply(gulp, ['default']);