2019-05-25 13:49:00 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var gulp = require('gulp'),
|
|
|
|
concat = require('gulp-concat'),
|
|
|
|
uglifycss = require('gulp-uglifycss'),
|
|
|
|
rename = require('gulp-rename'),
|
|
|
|
flatten = require('gulp-flatten');
|
2019-05-26 07:56:47 +00:00
|
|
|
|
2019-05-25 13:49:00 +00:00
|
|
|
gulp.task('build-css', function() {
|
|
|
|
return gulp.src([
|
|
|
|
'src/components/common/Common.css',
|
|
|
|
'src/components/**/*.css'
|
|
|
|
])
|
|
|
|
.pipe(concat('primevue.css'))
|
2020-12-31 18:26:58 +00:00
|
|
|
.pipe(gulp.dest('dist/resources'))
|
2019-05-25 13:49:00 +00:00
|
|
|
.pipe(uglifycss({"uglyComments": true}))
|
|
|
|
.pipe(rename('primevue.min.css'))
|
2020-12-29 18:25:30 +00:00
|
|
|
.pipe(gulp.dest('dist/resources'));
|
2019-05-25 13:49:00 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('build-themes', function() {
|
|
|
|
return gulp.src([
|
2022-08-22 13:47:07 +00:00
|
|
|
'public/themes/**/*','!public/themes/soho-*/**/*','!public/themes/viva-*/**/*',
|
2020-11-26 08:53:02 +00:00
|
|
|
'!public/themes/mira/**/*', '!public/themes/nano/**/*'
|
2019-05-25 13:49:00 +00:00
|
|
|
])
|
2020-12-29 18:25:30 +00:00
|
|
|
.pipe(gulp.dest('dist/resources/themes'));
|
2019-05-25 13:49:00 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
gulp.task('images', function() {
|
|
|
|
return gulp.src(['src/components/**/images/*.png', 'src/components/**/images/*.gif'])
|
|
|
|
.pipe(flatten())
|
2020-12-29 18:25:30 +00:00
|
|
|
.pipe(gulp.dest('dist/resources/images'));
|
2019-05-25 13:49:00 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
//Building project with run sequence
|
2022-08-22 13:47:07 +00:00
|
|
|
gulp.task('build-resources', gulp.series("build-css", "images", "build-themes"));
|
2019-05-25 13:49:00 +00:00
|
|
|
|