-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
44 lines (36 loc) · 1.05 KB
/
Copy pathgulpfile.js
File metadata and controls
44 lines (36 loc) · 1.05 KB
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
42
43
44
/// <binding ProjectOpened='watch' />
var gulp = require('gulp');
var sass = require('gulp-sass');
var run = require('gulp-run');
var jsonminify = require('gulp-jsonminify');
var sassPath = ['app/**/*.scss'];
var wineCriteriasPath = ['resources/wine-criterias.json'];
var wineCriteriasDestinationPath = 'app/data';
function reportChange(event) {
console.log(event.type + ' : ' + event.path);
}
gulp.task('sass',
function () {
return gulp.src(sassPath)
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('app'));
});
gulp.task('wineCriterias',
function() {
return gulp.src(wineCriteriasPath)
.pipe(jsonminify())
.pipe(gulp.dest(wineCriteriasDestinationPath));
});
gulp.task('watch',
function () {
gulp.watch(sassPath, ['sass']).on('change', reportChange);
});
gulp.task('livesync',
function () {
return run('tns livesync android --watch',
{
verbosity: 3
})
.exec()
.pipe(gulp.dest('output'));
});