-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
32 lines (28 loc) · 981 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
var gulp = require('gulp'),
addsrc = require('gulp-add-src'),
less = require('gulp-less'),
jasmineBrowser = require('gulp-jasmine-browser');
function getNittroFiles(pkg, type) {
var prefix = pkg ? './node_modules/' + pkg + '/' : './';
return require(prefix + 'nittro.json').files[type || 'js'].map(function (file) {
return prefix + file;
});
}
var files = {
js: [
'node_modules/promiz/promiz.js'
]
.concat(getNittroFiles('nittro-core'))
.concat(getNittroFiles('nittro-extras-dialogs'))
.concat(getNittroFiles())
.concat('tests/specs/**.spec.js'),
css: getNittroFiles('nittro-extras-dialogs', 'css')
};
gulp.task('test', function () {
return gulp.src(files.css)
.pipe(less())
.pipe(addsrc.append(files.js, {base: process.cwd()}))
.pipe(jasmineBrowser.specRunner({console: true}))
.pipe(jasmineBrowser.headless());
});
gulp.task('default', ['test']);