Skip to content

Commit e84a339

Browse files
clean code
1 parent eaaa974 commit e84a339

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

packages/devextreme-themebuilder/src/modules/post-compiler.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ export function addInfoHeader(
2626
const header = buildThemeBuilderInfoHeader(version);
2727
const source = css.toString();
2828
const encoding = '@charset "UTF-8";';
29-
30-
// clean-css may emit @charset immediately followed by :root / @import with no newline.
3129
const charsetPrefix = /^@charset\s+"utf-8";\s*/i;
3230
const match = source.match(charsetPrefix);
31+
3332
if (match) {
3433
const rest = source.slice(match[0].length).trimStart();
3534

packages/nx-infra-plugin/src/executors/scss-build/executor.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ function createStarLicenseHeader(fileName: string, version: string): string {
7878
].join('\n');
7979
}
8080

81-
/**
82-
* Mirrors `style-compiler.js`: starLicense prepend, then
83-
* `.replace(/([\s\S]*)(@charset.*?;\s)/, '$2$1')` so `@charset` is the first bytes of output.
84-
*/
8581
function prependLicenseAndMoveCharsetFirst(minifiedCss: string, license: string): string {
8682
const withLicense = `${license}${minifiedCss}`;
8783
return withLicense.replace(/([\s\S]*)(@charset[^;]+;\s*)/, '$2$1');

0 commit comments

Comments
 (0)