fix(build): update glob API and remove unused Angular imports

Use globSync instead of callback-based glob (breaking change in glob v9+).
Remove unused MatHint and AsyncPipe imports to fix NG8113 warnings.
This commit is contained in:
Johannes Millan 2026-02-04 18:30:51 +01:00
parent 4d22a64955
commit 60203003f0
3 changed files with 5 additions and 9 deletions

View file

@ -19,7 +19,7 @@ import {
} from '../global-config.model';
import { ProjectCfgFormKey } from '../../project/project.model';
import { IS_ELECTRON } from '../../../app.constants';
import { MatFormField, MatHint, MatLabel } from '@angular/material/form-field';
import { MatFormField, MatLabel } from '@angular/material/form-field';
import { MatInput } from '@angular/material/input';
import { FormsModule } from '@angular/forms';
import { DialogClipboardImagesManagerComponent } from './dialog-clipboard-images-manager/dialog-clipboard-images-manager.component';
@ -36,7 +36,6 @@ import { getDefaultClipboardImagesPath } from '../../../util/get-default-clipboa
TranslatePipe,
MatFormField,
MatLabel,
MatHint,
MatInput,
FormsModule,
],

View file

@ -11,7 +11,6 @@ import { MatIcon } from '@angular/material/icon';
import { MatButton, MatIconButton } from '@angular/material/button';
import { TranslatePipe } from '@ngx-translate/core';
import { SnackService } from '../../../core/snack/snack.service';
import { AsyncPipe } from '@angular/common';
@Component({
// selector: 'dialog-add-note',
@ -32,7 +31,6 @@ import { AsyncPipe } from '@angular/common';
MatButton,
MatIconButton,
TranslatePipe,
AsyncPipe,
],
})
export class DialogAddNoteComponent extends DialogFullscreenMarkdownComponent {

View file

@ -1,13 +1,12 @@
/* eslint-env es6 */
const glob = require('glob');
const { globSync } = require('glob');
const fs = require('fs');
// "removeWOFF2": "find dist/ -type f -iname '*.woff' -delete && find dist/ -type f -iname '*.css' -exec sed -i \"s/, url\\('.*'\\) format\\('woff'\\)//g\" {} \\;",
glob('dist/*.woff', function (er, files) {
files.forEach((filePath) => {
fs.unlinkSync(filePath);
});
const files = globSync('dist/*.woff');
files.forEach((filePath) => {
fs.unlinkSync(filePath);
});
// NOTE: this would remove the dead references, but it should be no problem anyway