Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gulpfile for PhoneGap App on Ripple using Browserify
var gulp = require('gulp');
var browserify = require('gulp-browserify');
var concat = require('gulp-concat');
var styl = require('gulp-styl');
var path = require('path');
var o = require('open');
var ripple = require('ripple-emulator');
var webPath = function (p) { return path.join('./www/', p); };
// Builds the scripts based on a single entry point using browserify
gulp.task('scripts', function() {
transform: ['hbsfy'],
insertGlobals: true
// Concatenates all the CSS files together.
gulp.task('styles', function() {
compress: true
// The default task
gulp.task('default', function() {
// Watch the JS directory for changes and re-run scripts task when it changes'js/**'), function(evt) {'scripts');
// Watch the CSS directory for changes and re-run styles task when it changes'css/**'), function(evt) {'styles');
// Run scripts and styles tasks for the first time'scripts');'styles');
var options = {
keepAlive: false,
open: true,
port: 4400
// Start the ripple server
if ( {
o('http://localhost:' + options.port + '?enableripple=cordova-3.0.0');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment