Example #1
0
 gulp.watch('../app/views/**/*.php').on('change', function(file) {
     gulp.src(file.path)
     .pipe(livereload());
 });
Example #2
0
gulp.task('templates', function () {
    gulp.src('html/**/*.html')
        .pipe(livereload(server));
});
gulp.task('reload', function() {
  gulp.src(['**/*.{php,html}', 'js/*.js'])
  .pipe(livereload());
});
Example #4
0
gulp.task('live-reload', function() {
    gulp.src(["**/*.js", "!node_modules/**/*.*"])
			.pipe(livereload());
});
Example #5
0
gulp.task("styles", function () {
    gulp.src("css/**/*.less")
        .pipe(less())
        .pipe(gulp.dest("./css/"))
        .pipe(livereload(server));
});
Example #6
0
gulp.task('javascripts', function() {
  gulp.src(['./src/javascripts/jquery-1.11.0.min.js', './src/javascripts/bootstrap.min.js','./src/javascripts/buffer-loader.js', './src/javascripts/app.js'])
    .pipe(concat('main.js'))
    .pipe(gulp.dest('./build/javascripts'))
    .pipe(livereload());
});
Example #7
0
 ]).on('change', function(file) {
   livereload();
   //server.changed(file.path);
 });
Example #8
0
gulp.task('partials', function () {
    gulp.src('./app/modules/**/*.html')
        .pipe(gulp.dest('./build/partials'))
        .pipe(livereload());
});
Example #9
0
gulp.task('html', function () {
  return gulp.src(paths.views)
    .pipe(plumber())
    .pipe(refresh(client))
    .pipe(notify({message: 'Views refreshed'}));
});
Example #10
0
gulp.task('reloadCSS', function () {
    return gulp.src('./public/style.css').pipe(livereload());
});
Example #11
0
 gulp.watch('source/*.html', function(event) {
   gulp.src('source/*.html')
     .pipe(refresh(server));
 });
Example #12
0
gulp.task('html',function(){
	return gulp.src(paths.html).
	pipe(liveReload())
});
Example #13
0
 gulp.watch(appFiles, function (file) {
   gulp.src(file.path).pipe(reload(server))
 })
gulp.task("html", () => {
  return gulp.src(config.paths.html)
  .pipe(gulp.dest(config.paths.baseDir))
  .pipe(cond(!PROD, livereload()));
});
Example #15
0
gulp.task('js', function() {
  gulp.src(paths.scripts)
    .pipe(plumber())
    .pipe(livereload());
});
Example #16
0
gulp.task('css', function () {
  return gulp.src(paths.styles.css)
    .pipe(plumber())
    .pipe(refresh(client))
    .pipe(notify({message: 'CSS refreshed'}));
});
Example #17
0
gulp.task('fonts', function() {
  gulp.src('./src/fonts/**/*.*')
    .pipe(gulp.dest('./build/fonts'))
    .pipe(livereload());
});
Example #18
0
 .on('restart', function () {
   refresh(client);
 });
gulp.task('dist', function() {
  gulp.src('./*.js')
    .pipe(gulp.dest('dist'))
    .pipe(livereload());
    console.log(livereload.server);
});
Example #20
0
gulp.task('html', function () {
    return gulp.src(['**/*.html','!node_modules/**','!libs/**','!bin/**'])
        .pipe(gulpif(argv.prod, htmlmin()))
        .pipe(gulp.dest(destDir))
        .pipe(livereload());
});
Example #21
0
    mocha = require('gulp-mocha'),
    paths = {
      app: 'server.js',
      build : app.config.buildDir,
      css: app.config.publicDir + 'css/**/*',
      views: './app/views/**/*',
      img: app.config.publicDir + 'img/**/*',
      lib: app.config.publicDir + 'lib/**/*',
      js: [app.config.publicDir + 'js/**/*', 'app/**/*.js'],
    };


    // ONLY REQUIRE LIVE-RELOAD IF IT'S REQUIRED
    if ( app.config.liveReload.use === true ) {
      var livereload = require('gulp-livereload'),
          server = livereload(app.config.liveReload.port);
    }


  // CONDITIONAL REQUIREMENTS

  // STYLUS
  if ( app.config.engines.css === 'stylus' ) {
    var stylus = require('gulp-stylus');
  }

  // SASS
  if ( app.config.engines.css === 'sass' ) {
    // var sass = require('gulp-ruby-sass');
    var sass = require('gulp-sass');
  }
Example #22
0
 }).on('restart', function () {
     gulp.src('./dist/src/main/api/index.js')
     .pipe(livereload());
 });
Example #23
0
	}).on('start', function(){
		// when the app has restarted, run livereload.
		gulp.src("server.js")
			.pipe(livereload());
	})
Example #24
0
gulp.task('html', function() {
  return gulp.src('./src/**/*.html')
  .pipe(gulp.dest('./dist/'))
  .pipe(livereload());
});
Example #25
0
gulp.task("scripts", function () {
    gulp.src("js/**/*.js")
        .pipe(livereload(server));
})
Example #26
0
var gulp = require("gulp"); 
var browserify = require("browserify"); 
var source = require('vinyl-source-stream');
var livereload = require('gulp-livereload');

var live = livereload();
livereload.listen();

gulp.task('browserify', function(){
    return browserify({
        entries:[ './src/js/main.jsx' ], 
        'debug': true
    })
        .transform('reactify',{'harmony': true})
        .bundle()
        .on('error', function( err ){
            console.log( '[錯誤]', err );
            this.end();
        })
        .pipe(source('main.js'))
        .pipe(gulp.dest('dist/js'));
});


gulp.task('copy', function(){
    gulp.src('src/index.html')
        .pipe(gulp.dest('dist'));

    gulp.src('src/assets/**/*.*')
        .pipe(gulp.dest('dist/assets'));
});
Example #27
0
 function buildApplicationStaticAssets () {
   var stream = gulp.src(config.files.static_assets.app)
     .pipe(gulp.dest(config.build_dir + 'assets/'))
     .pipe(livereload());
   return stream;
 }
Example #28
0
gulp.task('html', function() {
  gulp.src('./**/*.php')
    .pipe(livereload());
});
Example #29
0
gulp.task('livereload-server', function () {
    var server = livereload()
    gulp.watch(CLIENT_BUILD+'/**/*').on('change', function(file) {
        server.changed(file.path)
    })
})
Example #30
0
gulp.task('php-reload', function() {
    gulp.src('**/*.php')
    .pipe(livereload());
});