-
Notifications
You must be signed in to change notification settings - Fork 5
/
gulpfile.js
41 lines (36 loc) · 944 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var rimraf = require('rimraf');
var gulp = require('gulp');
var webserver = require('gulp-webserver');
var concat = require('gulp-concat');
var jshint = require('gulp-jshint');
var sketch = require('gulp-sketch');
var browserify = require('browserify');
var server = {
host: 'localhost',
port: '8080'
}
gulp.task('sketch', function() {
return gulp.src('./examples/assets/sketch/*.sketch')
.pipe(
sketch({
export: 'slices',
formats: 'png',
outputJSON: 'index.json',
saveForWeb: true,
groupConentsOnly: true
})
)
.pipe(gulp.dest('./examples/hiro-ui/images'));
});
gulp.task('webserver', function() {
gulp.src( './' )
.pipe(webserver({
host: server.host,
port: server.port,
livereload: true
}));
});
gulp.task('watch', function() {
gulp.watch('./examples/assets/sketch/*.sketch', ['sketch']);
});
gulp.task('default', ['webserver', 'watch']);