forked from compucorp/uk.co.compucorp.civicase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
49 lines (40 loc) · 1.1 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
/**
* @file
* Contains gulp tasks for the application
*
* Available Tasks
* default
* sass:sync
* sass
* test
* watch
*/
'use strict';
var gulp = require('gulp');
var sassTask = require('./gulp-tasks/sass.js');
var sassSyncTask = require('./gulp-tasks/sass-sync.js');
var testTask = require('./gulp-tasks/karma-unit-test.js');
var watchTask = require('./gulp-tasks/watch.js');
var generateTranslationsTask = require('./gulp-tasks/generate-translations.js');
/**
* Updates and sync the scssRoot paths
*/
gulp.task('sass:sync', sassSyncTask);
/**
* Compiles civicase.scss under scss folder to CSS counterpart
*/
gulp.task('sass', gulp.series('sass:sync', sassTask));
/**
* Runs Karma unit tests
*/
gulp.task('test', (done) => testTask(done, { singleRun: true }));
gulp.task('test:watch', (done) => testTask(done, { singleRun: false }));
/**
* Watches for scss and js file changes and run sass task and karma unit tests
*/
gulp.task('watch', watchTask);
/**
* Runs sass and test task
*/
gulp.task('default', gulp.series('sass', 'test'));
gulp.task('generate-translations', generateTranslationsTask);