How to use gulp-connect - 10 common examples

To help you get started, we’ve selected a few gulp-connect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Wikia / app / extensions / wikia / ArticleVideo / bower_components / html5-skin / gulpfile.js View on Github external
})
      .on('end', function() {
        gutil.log(gutil.colors.green(file + ' DONE'));
      })
      .pipe(source(file))
      .pipe(buffer())
      .pipe(sourcemap ? sourcemaps.init({loadMaps: true}) : gutil.noop())
      // Add transformation tasks to the pipeline here.
      .pipe(replace('', hash))
      .pipe(ugly ? uglify() : gutil.noop())
      .pipe(sourcemap ? sourcemaps.write('./') : gutil.noop())
      .pipe(gulp.dest('./build'))
      .on('end', function () {
        callback();
      })
      .pipe(reload ? connect.reload() : gutil.noop());
  }
github banderson / generator-flux-react / app / templates / gulp / tasks / browserify.js View on Github external
function bundle() {
  return bundler.bundle()
  // log errors if they happen
  .on('error', gutil.log.bind(gutil, 'Browserify Error'))
  .pipe(source(config.outputName))
  .pipe(gulp.dest(config.dest))
  .pipe(connect.reload());
}
github mingliangfeng / flux-riot / examples / todo / build / tasks / browserify.js View on Github external
function bundle() {
  return bundler.bundle()
  // log errors if they happen
  .on('error', gutil.log.bind(gutil, 'Browserify Error'))
  .pipe(source(config.outputName))
  .pipe(gulp.dest(config.dest))
  .pipe(connect.reload())
}
github angular / di.js / gulpfile.js View on Github external
.pipe(pipe.traceur())
      .pipe(gulp.dest('compiled/example'));
});

gulp.task('build_dist', ['build_source_cjs', 'build_source_amd']);
gulp.task('build', ['build_dist', 'build_examples']);


// WATCH FILES FOR CHANGES
gulp.task('watch', function() {
  gulp.watch(path.src, ['build']);
});


// WEB SERVER
gulp.task('serve', connect.server({
  root: __dirname,
  port: 8000,
  open: {
    browser: 'Google Chrome'
  }
}));




// This is a super nasty, hacked release task.
// TODO(vojta): fix gulp-git and clean this up
var git = require('gulp-git');
var through = require('through2');
var exec = require('child_process').exec;
github angular / templating / gulpfile.js View on Github external
runSequence(
    'clean',
    ['build_source_amd', 'build_source_cjs', 'build_source_es6', 'build_deps'],
    done
  );
});


// WATCH FILES FOR CHANGES
gulp.task('watch', ['build_source_amd'], function() {
  gulp.watch([path.lib, path.util, path.example, path.exampleCopy, path.testLib, path.testExample], ['build_source_amd']);
});


// WEB SERVER
gulp.task('serve', connect.server({
  root: [__dirname],
  port: 8000,
  livereload: false,
  open: false
}));


var clientify = require('clientify');
var rename = function(search, replace) {
  return through.obj(function(file, enc, done) {
    file.path = file.path.replace(search, replace);
    this.push(file);
    done();
  });
};
github eclifford / generator-testudo / gulp / tasks / connect.js View on Github external
module.exports = function() { 
  var gulp = require('gulp');
  var connect = require('gulp-connect');
  
  gulp.task('connect', connect.server({
    port: 1337,
    livereload: false,
    middleware: function(connect, options) {
      return [
        connect.static('./build'),
        connect.static('./app')
      ]
    }
  }));
}
github circuitsim / circuit-simulator / gulpfile.js View on Github external
function rebundle() {
    return bundler.bundle()
      .on('error', handleError)
      .pipe(source('main.js'))
      .pipe(buffer())
      .pipe(sourcemaps.init({ loadMaps: true }))
      .pipe(sourcemaps.write('./'))
      .pipe(gulp.dest(devBuildDir))
      .pipe(connect.reload());
  }
github dasilvacontin / animus / tasks / browserify.js View on Github external
function bundle () {
  return bundler.bundle()
    .pipe(source('bundle.js'))
    .pipe(buffer())
    .pipe(sourcemaps.init({ loadMaps: true }))
    .pipe(sourcemaps.write('./'))
    .pipe(gulp.dest('./dist'))
    .pipe(connect.reload())
}
github lytics / pathforajs / gulpfile.js View on Github external
gulp.task('build:styles', function () {
  gulp.src('src/less/*.less')
    .pipe(less({
      paths: [
        path.join(__dirname, 'less', 'includes')
      ]
    }))
    .pipe(gulp.dest('dist'))
    .pipe(cssmin())
    .pipe(rename({
      suffix: '.min'
    }))
    .pipe(gulp.dest('dist'))
    .pipe(connect.reload());
});
github LoeiFy / Mirror / gulpfile.js View on Github external
gulp.task('reload', function () {
    return gulp.src(['index.html'])
        .pipe(connect.reload())
})

gulp-connect

Gulp plugin to run a webserver (with LiveReload)

MIT
Latest version published 6 years ago

Package Health Score

51 / 100
Full package analysis

Popular gulp-connect functions