This repository was archived by the owner on Sep 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
105 lines (88 loc) · 2.51 KB
/
Copy pathgulpfile.js
File metadata and controls
105 lines (88 loc) · 2.51 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
var gulp = require('gulp')
uglify = require('gulp-uglify')
minify = require('gulp-minify')
concat = require('gulp-concat')
notify = require('gulp-notify')
mergeJson = require('gulp-merge-json');
var paths = {
bowerDir: './bower_components',
npmDir: './node_modules',
scriptDest: './web/js/',
cssDest: './web/css/',
fontDest: './web/fonts/',
resourcesDir: './app/Resources/',
localeDest: 'web/locales/'
};
/**
* Javascript-Files
*/
gulp.task('scriptsGeneral', function() {
return gulp.src([
paths.npmDir + '/shuffle-array/dist/shuffle-array.min.js',
paths.npmDir + '/jquery/dist/jquery.js',
paths.npmDir + '/bootstrap/dist/js/bootstrap.js',
paths.npmDir + '/chart.js/dist/Chart.bundle.min.js',
])
//.pipe(uglify())
.pipe(concat('static.js'))
.pipe(gulp.dest(paths.scriptDest));
});
gulp.task('scriptsFrontEnd', function() {
return gulp.src([
])
.pipe(concat('staticFrontEnd.js'))
.pipe(gulp.dest(paths.scriptDest));
});
gulp.task('scriptsBackEnd', function() {
return gulp.src([
])
.pipe(concat('staticBackEnd.js'))
.pipe(gulp.dest(paths.scriptDest));
});
/**
* Stylesheet files
*/
gulp.task('cssGeneral', function() {
return gulp.src([
paths.npmDir + '/bootstrap/dist/css/bootstrap.css',
paths.npmDir + '/font-awesome/css/font-awesome.css',
])
.pipe(concat('static.css'))
.pipe(gulp.dest(paths.cssDest));
});
gulp.task('cssBackEnd', function() {
return gulp.src([
])
.pipe(concat('staticBackEnd.css'))
.pipe(gulp.dest(paths.cssDest));
});
gulp.task('cssFrontEnd', function() {
return gulp.src([
])
.pipe(concat('staticFrontEnd.css'))
.pipe(gulp.dest(paths.cssDest));
});
gulp.task('fonts', function() {
return gulp.src([
paths.npmDir + '/bootstrap/dist/fonts/*.*',
paths.npmDir + '/font-awesome/fonts/*.*',
])
.pipe(gulp.dest(paths.fontDest));
});
gulp.task('localesDe', function() {
return gulp.src('locales/**/de.json')
.pipe(mergeJson('de.json'))
.pipe(gulp.dest(paths.localeDest));
});
gulp.task('localesEn', function() {
return gulp.src('locales/**/en.json')
.pipe(mergeJson('en.json'))
.pipe(gulp.dest(paths.localeDest));
});
gulp.task('localesRu', function() {
return gulp.src('locales/**/ru.json')
.pipe(mergeJson('ru.json'))
.pipe(gulp.dest(paths.localeDest));
});
// The default task (called when you run `gulp` from cli)
gulp.task('default', ['scriptsGeneral', 'scriptsFrontEnd','scriptsBackEnd','cssFrontEnd', 'cssGeneral','cssBackEnd','fonts', 'localesDe', 'localesEn','localesRu']);