Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将gulp watchless 集成到zero中去 #55

Open
wov opened this issue Jan 19, 2015 · 3 comments
Open

将gulp watchless 集成到zero中去 #55

wov opened this issue Jan 19, 2015 · 3 comments
Labels

Comments

@wov
Copy link

wov commented Jan 19, 2015

使用node的监听文件

@wov wov added the ideas label Jan 19, 2015
@wov
Copy link
Author

wov commented Jan 19, 2015

甚至可以用来使用socket刷新浏览器

@Wooleners
Copy link

gulp + browserSync

@Wooleners
Copy link

var gulp = require('gulp'),
    config = require('../config'),
    less = require('gulp-less'),
    handleError = require('../handleError'),
    autoprefixer = require('gulp-autoprefixer'),
    browserSync = require('browser-sync'),
    reload = browserSync.reload;

gulp.task('build:less',function () {
  var dest = config.isDeploy?'app/css/':'app/';
  return gulp.src('src/modules/index/index.less')
    .pipe(less())
    .pipe(autoprefixer("last 1 version", "> 1%", "ie 8", "ie 7"))
    .on('error', handleError)
    .pipe(gulp.dest(dest))
    .pipe(reload({stream: true}))
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants