gulp.task('server', function() {
	var server = gls.static('./',8000);
	server.start();
	gulp.watch('./*.html', function(file){
		server.notify.apply(server,[file]);
	});
});
gulp.task('serve', function() {
  let server = gls.static('./', 8888);
  server.start();
  gulp.watch([paths.sass, paths.js], function (file) {
    server.notify.apply(server, [file]);
  });
});
示例#3
0
gulp.task('host', function () {
    var port = process.env.PORT || 8000;
    server = gls.static('build', port);

    require('connect-livereload')();
    server.start();
});
gulp.task('serve', function() {
    // serve with default settings
    var server = gls.static('static', 3000); //equals to gls.static('public', 3000);
    server.start();

    //use gulp.watch to trigger server actions(notify, start or stop)
    gulp.watch(['static/**/*.css', 'static/**/*.html'], server.notify);
});
示例#5
0
gulp.task('serve', function () {
    var server = gls.static('./', 3000);
    server.start();
    
    gulp.watch(['./**/*.css', './**/*.js', './**/*.html'], function (file) {
        server.notify.apply(server, [file]);
    });
});
示例#6
0
文件: gulpfile.js 项目: ygui/gauge
gulp.task('serve', function() {
	//1. serve with default settings
	var server = gls.static('./', 8000); //equals to gls.static('public', 3000);
	server.start();

	gulp.watch(['assets/src/**/*.sass', 'assets/src/**/*.js', './*.html'], function (file) {
		server.notify.apply(server, [file]);
	});
});
示例#7
0
gulp.task('serve', 'starts a local webserver', function() {
  const server = gls.static('dist', 8000);
  server.start();
  gulp.watch(['dist/*.html', 'dist/img/*.{png,jpg,gif}', 'dist/video/*.{mp4,webm}'], function(file) {
    /* eslint-disable */
    server.notify.apply(server, [file]);
    /* eslint-enable */
  });
});
示例#8
0
文件: gulpfile.js 项目: recallfx/abc
gulp.task('serve-dev', ['lint', 'templates'], function() {
    var server = liveServer.static();
    server.start();

    //use gulp.watch to trigger server actions(notify, start or stop)
    return gulp.watch(['./**/*.{html,htm,css,js}' ], function (file) {
        server.notify.apply(server, [file]);
    });
});
示例#9
0
gulp.task('server', function () {
    var port = process.env.PORT || 8000;
    server = gls.static('build', port);

    require('connect-livereload')();
    require('../server-scripts/portfolio-updater.js').initialize();

    server.start();
});
示例#10
0
gulp.task('serve', ['build'], function() {
  var server = serve.static('dist').start();

  gulp.watch(['src/*.jade'], ['jade']);
  gulp.watch(['src/js/*.js'], ['bundle']);
  gulp.watch(['src/styles/*.scss'], ['sass']);
  gulp.watch(['src/assets/*'], ['images']);
  gulp.watch(['src/**/*'], server.notify);
});
示例#11
0
gulp.task('serve', function() {
  var server = lvserver.static('./src/', 8000);
  server.start();

  gulp.watch('./src/less/*.less', ['less']);
  gulp.watch(['./src/css/*.css', './src/index.html'], function(file) {
    lvserver.notify.apply(server, [file]);
  });
});
示例#12
0
gulp.task('serve', function() {
    var server = gls.static('src', 8000);
    server.start();
    gulp.watch(['src/**/*.js', 'src/**/*.css', 'src/**/*.html'], function () {
        // TODO: Figure out how to do this
        gulp.start('inject-script-links');
        server.notify.apply(server, arguments);
    });
});
示例#13
0
gulp.task('serve', function() {
  var server = gls.static('public', 8000);
  server.start();
  gulp.watch(['public/**/*.css', 'public/**/*.html','public/js/*.js'], function (file) {
  server.notify.apply(server, [file]);
  });
  gulp.watch(paths.styles + '/**/*.styl', ['css','maincss']);
  gulp.watch(paths.html + '/**/*.jade', ['html']);
});
gulp.task('serve', ['watch'], function() {
  var server = liveserver.static('dist'); 
  server.start();

  //use gulp.watch to trigger server actions(notify, start or stop) 
  gulp.watch(['dist/**'], function (file) {
    util.log("reloading Via dist..");
    server.notify.apply(server, [file]);
  });
});
示例#15
0
gulp.task('serve', ['watch'], function() {
  var server = gls.static('./examples');
  server.start();
 
  gulp.watch(['examples/**/*.css', 'examples/**/*.js', 'examples/**/*.html'], function (file) {
    server.notify.apply(server, [file]);
  });

  opn('http://localhost:3000/', {app: ['chrome', '']});
});
示例#16
0
gulp.task('serve', function() {
  var server = gls.static('build', 3000);
  server.start().then(function(result) {
    process.exit(result.code);
  });

  gulp.watch(['build/css/main.css', 'build/index.html'], function(file) {
    server.notify.apply(server, [file]);
  });
})
gulp.task('serve',function(){
  var server = gls.static('test')
  server.start()
  gulp.watch('src/*.css',['css'])
  gulp.watch('src/*.js',['js'])
  gulp.watch('src/*.html',['html'])
  gulp.watch(['test/*'],function(file){
    server.notify.apply(server,[file])
  })
})
示例#18
0
文件: gulpfile.js 项目: recallfx/abc
gulp.task('serve-dist', ['default'], function() {
    // serve at custom port
    var server = liveServer.static('dist', 8888);
    server.start();

    //use gulp.watch to trigger server actions(notify, start or stop)
    return gulp.watch(['./dist/**/*.{html,htm,css,js}'], function (file) {
        server.notify.apply(server, [file]);
    });
});
示例#19
0
gulp.task('serve', function() {
  //1. serve with default settings
  var server = gls.static('build'); //equals to gls.static('public', 3000);
  server.start();

  //use gulp.watch to trigger server actions(notify, start or stop)
  gulp.watch(['build/**/*.css', 'build/**/*.html'], function (file) {
    server.notify.apply(server, [file]);
  });
});
示例#20
0
gulp.task('server', function() {
	var server = gls.static($build, $port);
	server.start();
	console.log('Localhost en http://localhost:' + $port);

	gulp.watch([$build +'/*.html'], function (file) {
		server.notify.apply(server, [file]);
	});

});
示例#21
0
 function() {
   const port = argv.port || 8000;
   const server = gls.static(paths.dist.dir, port);
   server.start();
   gulp.watch([paths.dist.html], function(file) {
     /* eslint-disable */
     server.notify.apply(server, [file]);
     /* eslint-enable */
   });
 });
示例#22
0
gulp.task('start', ['browserSync','sass'], function() {
  //2. serve at custom port
  var server = gls.static('./', 3000);
  // var server = gls('./', true, 3030);
  server.start();

  //use gulp.watch to trigger server actions(notify, start or stop)
  gulp.watch(['./scss/*.scss', './index.html'], ['sass'], function (file) {
    server.notify.apply(server, [file]);
  });
});
示例#23
0
gulp.task('serve', function() {
    var serve = server.static('./public', 8000);
    serve.start();
    gulp.watch('public/js/**/*.js', function (file) {
        server.notify.apply(serve, [file]);
    });
    gulp.watch('public/**/*.html', function (file) {
        server.notify.apply(serve, [file]);
    });

});
示例#24
0
gulp.task('serve', function() {
  var server = gls.static('public', 8080); 
  server.start();
    
  //use gulp.watch to trigger server actions(notify, start or stop) 
  gulp.watch(['index.html','app/**/*'], function (file) {
      console.log('Notificando');
      runSequence('build', function(){
          server.notify.apply(server, [file]);
      });
  });
});
示例#25
0
gulp.task('serve', function () {
    var server = gls.static(root, port);
    server.start();
    
    gulp.watch([
        dist + '**/*.js',
        dist + '**/*.css',
        dist + '**/*.html'
    ], function (file) {
        server.notify.apply(server, [file]);
    });
});
示例#26
0
gulp.task('default', function() {
	var server = gls.static('.', 6060);
	server.host = '0.0.0.0';
	server.start();

	gulp.watch(
		[
			'*.html', '*.json', '*.md',
			'js/**/*.js', 'js/**/*.css',
			'css/*.css'
		],
		server.notify);
});
示例#27
0
 function() {
   const port = argv.port || 8000;
   const server = gls.static(paths.dist.dir, port);
   config.host = "http://localhost:" + port;
   server.start();
   gulp.watch([paths.dist.html, paths.dist.scripts], function(file) {
     setTimeout(function() {
       /* eslint-disable */
       server.notify.apply(server, [file]);
       /* eslint-enable */
     }, 500);
   });
 });
示例#28
0
gulp.task('watch-files', function() {
	//livereload.listen();
	var server = gls.static('dist', 3000);
	server.start();
	gulp.watch(paths.jadeTemplate, ['jade']);
	gulp.watch(paths.angularApp, ['angular-app']);
	gulp.watch(paths.angularTemplates, ['angular-tmpl']);
	gulp.watch(paths.lessFile, ['build-less']);
	gulp.watch('bower.json', ['bower']);
	gulp.watch(['dist/js/*.js','dist/index.html', 'dist/css/*.css'], function (file) {
		server.notify.apply(server, [file]);
	});

});
gulp.task('watch', 'developing', ['build'], () => {
  let server = gls.static('build', 8888);
  server.start();

  gulp.watch(['src/assets/scss/**/*.scss'], ['sass']);
  gulp.watch(['src/**/*'], ['build']);
  gulp.watch(['build/**/*'], function (file) {
    server.notify.apply(server, [file]);
  });

  process.on('exit', function() {
    server.stop();
  });
});
示例#30
0
gulp.task('watch', () => {
  const server = gls.static('public', 3000);
  server.start();

  gulp.watch(['src/pug/*.pug'], { usePolling: true }, gulp.parallel('pug'));
  gulp.watch(['src/scss/*.scss'], { usePolling: true }, gulp.parallel('scss'));

  gulp.watch(['public/**/*.css', 'public/**/*.html']).on('change', (path) => {
    server.notify({
      path
    });
  });

  gulp.watch('public/**/*.js', server.start.bind(server));
});