How to use the gulp-connect.server function in gulp-connect

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 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 johnfmorton / generator-buildabanner / generators / app / templates / _gulpfile.babel.js View on Github external
return new Promise(function(resolve, reject) {
    serverInfo = connect.server({
      name: 'Build A Banner Server',
      port: 8889,
      root: ['dev', '.temp'],
      livereload: true,
    });
    resolve();
  });
}
github ampproject / amphtml / build-system / tasks / serve.js View on Github external
const startedPromise = new Promise(resolve => {
    started = resolve;
  });
  setServeMode(modeOptions);
  const options = {
    name: 'AMP Dev Server',
    root: process.cwd(),
    host: argv.host || 'localhost',
    port: argv.port || 8000,
    https: argv.https,
    preferHttp1: true,
    silent: true,
    middleware: getMiddleware,
    ...connectOptions,
  };
  connect.server(options, started);
  await startedPromise;
  url = `http${options.https ? 's' : ''}://${options.host}:${options.port}`;
  log(green('Started'), cyan(options.name), green('at'), cyan(url));
  logServeMode();
}
github Minishlink / pwa-qr-code-scanner / Gulpfile.js View on Github external
function serve(rootDir) {
    connect.server({
        root: rootDir
    });
}
github ProgrammeVitam / vitam / sources / ihm-demo / ihm-demo-web-application / src / main / resources / webapp / gulpfile.js View on Github external
function serve() {
    connect.server({
        root: ['dist/'],
        port: 9000,
        livereload: true,
        middleware: function (connect, opt) {
            return [
                proxy('/ihm-demo', {
                    target: 'http://localhost:8082',
                    changeOrigin: true
                })
            ]
        }
    });
}
github be-fe / iSlider / gulpfile.js View on Github external
function startServer(port) {
    var connect = require('gulp-connect');
    connect.server({
        root: '.',
        port: port,
        livereload: true
    });
}
github digidem / react-mapfilter / gulpfile.js View on Github external
gulp.task('dev-server', function startServer() {
  connect.server({
    root: './dist',
    livereload: true,
  })
})

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