
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
mat-icon-import
Advanced tools
Include only used material icons in SVG format and reduce package size
npm i mat-icon-import
#or
yarn add mat-icon-import
At first download the icons you need from here in SVG 24px format (default). The icon names are of type baseline-[key]-24px.svg
. You will have to use the key
when importing this lib.
Import the IconImportModule
in your application module and call the forRoot()
function with two parameters. At first the array of icon keys, e.g. (account_circle, add or whatever you want). The secont parameter is the path where you store the icons in your assets folder.
import { IconImportModule } from 'mat-icon-import';
@NgModule({
imports: [ IconsModule.forRoot(['account_circle'], './assets/mat-icons') ]
})
export class AppModule {}
Register the icons where you need them. E.g. in the AppComponent
to make it available in the complete application.
import { IconImportService } from 'mat-icon-import';
@Component({
...
})
export class AppComponent {
constructor (private iconService: IconImportService) {
this.iconService.register();
}
}
Use the registered icons with
<mat-icon svgIcon="account_circle"></mat-icon>
Don't forget to include the MatIconModule
from @angular/material
.
FAQs
Include only used material icons in SVG format and reduce package size
The npm package mat-icon-import receives a total of 35 weekly downloads. As such, mat-icon-import popularity was classified as not popular.
We found that mat-icon-import demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.