-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
46 lines (38 loc) · 1.09 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
var gulp = require('gulp');
var concat = require('gulp-concat');
var handlebars = require('gulp-ember-handlebars');
var karma = require('gulp-karma')
var templates = ['js/templates/*.handlebars']
var files = [
"js/vendor/jquery/dist/jquery.min.js",
"js/vendor/handlebars/handlebars.js",
"js/vendor/ember/ember.js",
"js/app.js",
"js/vendor/jquery-mockjax/jquery.mockjax.js",
"js/dist/tmpl.min.js"
]
var testFiles = [
"js/tests/integration_test_helper.js",
"js/tests/integration_tests.js",
"js/tests/unit_tests.js"
]
var allFiles = files.concat(testFiles)
gulp.task('concat', function(){
gulp.src(files)
.pipe(concat('app.min.js'))
.pipe(gulp.dest('js/dist'));
});
gulp.task('templates', function(){
gulp.src(templates)
.pipe(handlebars({output: 'browser'}))
.pipe(concat('tmpl.min.js'))
.pipe(gulp.dest('js/dist'));
});
gulp.task('test', function(){
gulp.src(allFiles)
.pipe(karma({
configFile: 'karma.conf.js',
action: 'run'
}));
});
gulp.task('default', ['templates', 'concat'])