1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00

Fix @charset CSS declaration in bundle. (#2028)

This commit is contained in:
Paweł Kuna
2025-01-02 11:59:39 +01:00
committed by GitHub
parent 0ac8e337e7
commit c293a66e0a
4 changed files with 66 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ const gulp = require('gulp'),
cp = require('child_process'),
pkg = require('./package.json'),
year = new Date().getFullYear(),
replace = require('gulp-replace'),
argv = yargs(process.argv).argv
let BUILD = false,
@@ -439,6 +440,7 @@ gulp.task('copy-dist', () => {
gulp.task('add-banner', () => {
return gulp.src(`${distDir}/{css,js}/**/*.{js,css}`)
.pipe(header(getBanner()))
.pipe(replace(/^([\s\S]+)(@charset "UTF-8";)\n?/, '$2\n$1'))
.pipe(gulp.dest(`${distDir}`))
})