forked from IronPans/freeng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
46 lines (39 loc) · 1.18 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
'use strict';
var gulp = require('gulp'),
concat = require('gulp-concat'),
uglifycss = require('gulp-uglifycss'),
rename = require('gulp-rename'),
del = require('del'),
flatten = require('gulp-flatten');
gulp.task('build-css', function() {
gulp.src([
'src/app/component/common/common.css',
'src/app/component/**/*.css'
])
.pipe(concat('freeng.css'))
.pipe(gulp.dest('resources'));
});
gulp.task('build-css-prod', function() {
gulp.src([
'src/app/component/common/common.css',
'src/app/component/**/*.css'
])
.pipe(concat('freeng.css'))
.pipe(gulp.dest('resources'))
.pipe(uglifycss({"uglyComments": true}))
.pipe(rename('freeng.min.css'))
.pipe(gulp.dest('resources'));
});
gulp.task('build-themes', function() {
return gulp.src(['src/assets/themes/*'])
.pipe(gulp.dest('resources/themes'));
});
gulp.task('build-images', function() {
gulp.src(['src/app/component/**/images/*.png', 'src/app/component/**/images/*.svg'])
.pipe(flatten())
.pipe(gulp.dest('resources/images'));
});
gulp.task('clean', function() {
del(['resources']);
});
gulp.task('build-release', ['clean','build-css-prod', 'build-images', 'build-themes']);