2022-09-10 21:55:24 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var gulp = require('gulp'),
|
|
|
|
concat = require('gulp-concat'),
|
|
|
|
uglifycss = require('gulp-uglifycss'),
|
|
|
|
rename = require('gulp-rename'),
|
|
|
|
flatten = require('gulp-flatten');
|
|
|
|
|
2022-09-14 14:26:41 +00:00
|
|
|
gulp.task('build-css', function () {
|
|
|
|
return gulp
|
2023-03-26 05:22:57 +00:00
|
|
|
.src(['./components/lib/common/Common.css', './components/**/*.css'])
|
2022-09-14 14:26:41 +00:00
|
|
|
.pipe(concat('primevue.css'))
|
|
|
|
.pipe(gulp.dest('dist/resources'))
|
|
|
|
.pipe(uglifycss({ uglyComments: true }))
|
|
|
|
.pipe(rename('primevue.min.css'))
|
|
|
|
.pipe(gulp.dest('dist/resources'));
|
2022-09-10 21:55:24 +00:00
|
|
|
});
|
|
|
|
|
2022-09-14 14:26:41 +00:00
|
|
|
gulp.task('build-themes', function () {
|
2023-01-27 11:56:16 +00:00
|
|
|
return gulp.src(['public/themes/**/*']).pipe(gulp.dest('dist/resources/themes'));
|
2022-09-14 14:26:41 +00:00
|
|
|
});
|
2022-09-10 21:55:24 +00:00
|
|
|
|
2022-09-14 14:26:41 +00:00
|
|
|
gulp.task('images', function () {
|
2023-03-26 05:22:57 +00:00
|
|
|
return gulp.src(['./components/lib/**/images/*.png', './components/lib/**/images/*.gif']).pipe(flatten()).pipe(gulp.dest('dist/resources/images'));
|
2022-09-10 21:55:24 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
//Building project with run sequence
|
2022-09-14 14:26:41 +00:00
|
|
|
gulp.task('build-styles', gulp.series('build-css', 'images', 'build-themes'));
|