Skip to content

Commit

Permalink
部分调整
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodyxu committed Feb 16, 2016
1 parent 0bc4190 commit 321c3c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var gulp = require('gulp');
var sketch = require('gulp-sketch');
var server = require('gulp-server-livereload');
var less = require('gulp-less');
var less = require('gulp-less');

//------gulp design-------------------------------------------------------
//监视sketch源文件的改动
Expand All @@ -14,19 +14,19 @@ gulp.task('export_artboards', function(){
return gulp.src('./sketch-doc/*.sketch') //监视src目录下所有sketch文件
.pipe(sketch({
export: 'artboards', //导出类型为artboard
//items: 'home', //导出的artboard名称
//items: 'home', //需要导出某个特定artboards的时候使用
formats: 'png', //导出的格式
scales: '1.0, 2.0' //导出@2x尺寸:需要在sketch中设定好输出尺寸
}))
.pipe(gulp.dest('./preview/artboards/')); //将导出的png文件放在dist/images/目录下
.pipe(gulp.dest('./preview/artboards/')); //将导出的png文件放在preview/artboards/目录下
});


//创建web服务器和livereload
gulp.task('design_server', function() {
gulp.src('preview') //监视路径
.pipe(server({
//defaultFile: 'index.html', //设定默认文件为index.html
defaultFile: './preview/index.html', //设定默认文件为index.html
livereload: true,
directoryListing: true,
open: true
Expand Down

0 comments on commit 321c3c1

Please sign in to comment.