-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
35 lines (31 loc) · 950 Bytes
/
Copy pathgulpfile.js
File metadata and controls
35 lines (31 loc) · 950 Bytes
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
const gulp = require('gulp');
const purify = require('gulp-purifycss');
const svgSprite = require('gulp-svg-sprite');
gulp.task('purifyCSS', () => {
return gulp.src('./dist/frontend/browser/styles.*.css')
.pipe(
purify(
['./src/app/**/*.ts', './src/app/**/*.html'],
{
info: true, // Outputs reduction information
minify: true, // Minifies the files after reduction
rejected: false, // Logs the CSS rules that were removed
whitelist: ['*transition*', '*dimmer*'] // Ignored css classes
}
),
)
.pipe(gulp.dest('./dist/frontend/browser/'));
});
const config = {
mode: {
symbol: {
inline: true,
sprite: 'sprites.svg'
}
}
};
gulp.task('svgSprite', function () {
return gulp.src(['src/assets/icons/*.svg']) // Path to your SVG icons
.pipe(svgSprite(config))
.pipe(gulp.dest('public/assets/')); // Output path for the sprite
});