-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
40 lines (31 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
var gulp = require('gulp'),
include = require('gulp-include'),
rename = require('gulp-rename'),
shell = require('gulp-shell');
// Qualtrics compilation
gulp.task('qualtrics', function() {
// Compile DEEPforQualtrics.js
gulp.src("src/qualtrics/DEEPforQualtrics.js")
.pipe(include())
.on('error', console.log)
.pipe(gulp.dest("dist/qualtrics"));
});
// LimeSurvey compilation
gulp.task('limesurvey', function() {
// Move the LimeSurvey plugin framework folder
gulp.src('src/limesurvey/**/*')
.pipe(gulp.dest('dist/limesurvey/DEEP'));
// Copy DEEPCore, DEEPTutorial, and DEEPLimeSurvey
gulp.src('src/DEEPCore.js')
.pipe(gulp.dest('dist/limesurvey/DEEP/assets'));
gulp.src('src/DEEPTutorial.js')
.pipe(gulp.dest('dist/limesurvey/DEEP/assets'));
gulp.src('src/DEEPLimeSurvey.js')
.pipe(gulp.dest('dist/limesurvey/DEEP/assets'));
// Zip up the DEEP folder to DEEP.zip
return gulp.src('dist/limesurvey/')
.pipe(shell([
'cd dist/limesurvey; rm DEEP.zip; zip -r DEEP.zip DEEP'
]));
});
gulp.task('default', ['qualtrics', 'limesurvey']);