-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
76 lines (59 loc) · 1.94 KB
/
Copy pathgulpfile.js
File metadata and controls
76 lines (59 loc) · 1.94 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
'use strict';
var gulp = require('gulp'),
shell = require('gulp-shell'),
exec = require('gulp-exec'),
sass = require('gulp-sass');
gulp.task('build', ['sass'], shell.task([
'docker-compose build'
]));
gulp.task('build-dev', ['sass'], shell.task([
'docker-compose -f dev.yml build'
]));
gulp.task('up', ['build'], shell.task([
'docker-compose up -d'
]));
gulp.task('up-dev', ['build'], shell.task([
'docker-compose -f dev.yml up -d'
]));
gulp.task('test', ['build'], shell.task([
'docker-compose run web py.test -v sots/sots_tests.py'
]));
gulp.task('coverage', ['build'], shell.task([
'docker-compose run web py.test --cov-report term-missing --cov=sots sots/sots_tests.py'
]));
gulp.task('js_dependencies', function() {
gulp.src([
'node_modules/jquery/dist/jquery.min.js',
'node_modules/bootstrap/dist/js/bootstrap.min.js',
'node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js'
]).pipe(gulp.dest('web/sots/static/js/libs'));
});
gulp.task('css_dependencies', function() {
gulp.src([
'node_modules/bootstrap/dist/css/bootstrap.min.css',
'node_modules/font-awesome/css/font-awesome.min.css',
'node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css'
]).pipe(gulp.dest('web/sots/static/css'));
});
gulp.task('fonts', function() {
gulp.src([
'node_modules/font-awesome/fonts/*.*'
]).pipe(gulp.dest('web/sots/static/fonts'));
});
gulp.task('sass', function() {
gulp.src('src/sass/sots.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('web/sots/static/css'));
});
gulp.task('images', function() {
gulp.src('src/images/*.*')
.pipe(gulp.dest('web/sots/static/images'));
});
gulp.task('depends', ['js_dependencies', 'css_dependencies', 'fonts', 'images'], function() {
});
gulp.task('default', function() {
gulp.run('build');
});
gulp.task('dev', function() {
gulp.run('up-dev');
});