forked from primefaces/primeng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
46 lines (38 loc) · 1.17 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([
'components/common/common.css',
'components/**/*.css'
])
.pipe(concat('primeng.css'))
.pipe(gulp.dest('resources'));
});
gulp.task('build-css-prod', function() {
gulp.src([
'components/common/common.css',
'components/**/*.css'
])
.pipe(concat('primeng.css'))
.pipe(gulp.dest('resources'))
.pipe(uglifycss({"uglyComments": true}))
.pipe(rename('primeng.min.css'))
.pipe(gulp.dest('resources'));
});
//Building images
gulp.task('images', function() {
return gulp.src(['components/**/images/*.png', 'components/**/images/*.gif'])
.pipe(flatten())
.pipe(gulp.dest('resources/images'));
});
//Cleaning previous gulp tasks from project
gulp.task('clean', function() {
del(['resources/primeng.css','resources/primeng.min.css','resources/images']);
});
//Building project with run sequence
gulp.task('build', ['clean','build-css-prod', 'images']);