forked from vaadin/vaadin-grid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
60 lines (51 loc) · 1.54 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
'use strict';
var gulp = require('gulp');
require('require-dir')('./tasks');
var common = require('./tasks/common');
require('web-component-tester').gulp.init(gulp);
var args = require('yargs').argv;
var sourcemaps = require('gulp-sourcemaps');
var ts = require('gulp-typescript');
var typings = require('gulp-typings');
gulp.task('default', function() {
console.log('\n Use:\n gulp <clean|gwt[ --gwt-pretty]|test[:validation:sauce]>\n');
});
gulp.task('clean', ['gwt:clean']);
gulp.task('gwt', ['gwt:copy']);
gulp.task('test', ['gwt:validate', 'test:local']);
gulp.task('test:desktop', function(done) {
common.testSauce(
[],
['Windows 10/chrome@45',
'Windows 10/firefox@41',
'Windows 10/internet explorer@11',
//'Windows 10/microsoftedge@20',
'OS X 10.10/safari@8.0'],
'vaadin-grid',
done);
});
gulp.task('test:mobile', function(done) {
common.testSauce(
[],
['OS X 10.10/iphone@9',
'Linux/android@5.1'],
'vaadin-grid',
done);
});
gulp.task('typings', function() {
return gulp.src('directives/typings.json')
.pipe(typings());
});
gulp.task('ng2', ['typings'], function() {
['directives', 'test/angular2'].forEach(function(dir) {
gulp.src([dir + '/*.ts', 'directives/typings/main/**/*.d.ts'])
.pipe(sourcemaps.init())
.pipe(ts(ts.createProject('directives/tsconfig.json')))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(dir));
});
});
gulp.task('ng2:watch', function() {
gulp.watch('directives/*.ts', ['ng2']);
gulp.watch('test/angular2/*.ts', ['ng2']);
});