
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@angular-extensions/svg-icons-builder
Advanced tools
The svg-icons-builder is a Angular builder for the svg-to-ts project
The svg-icons-builder is a Angular builder for the svg-to-ts project. It can be used to convert SVG icons inside an Angular library or SPA to an object, to constants or even to individual TypeScript or JavaScript files. Find out more on the official svg-to-ts docs.
NPM: npm install @angular-extensions/svg-icons-builder
Angular CLI: ng add @angular-extensions/svg-icons-builder
To use the builder you need to add a new entry to your architect
object inside your angular.json
.
A valid svg-to-ts configuration. ⚠️ the options depend on the conversionType
and may therefore vary. Means, a configuration for the convesionType: "files"
will look different than configuration for the conversionType: "constants"
. Each conversionType
has it's own builder.
In our example we call it generate-icons
. You then need to specify the following properties:
conversionType: constants
"@angular-extensions/svg-icons-builder:svg-icons-constants-builder"
"generate-icons": {
"builder": "@angular-extensions/svg-icons-builder:svg-icons-constants-builder",
"options": {
"conversionType": "constants",
"fileName": "myIcons",
"generateType": false,
"generateTypeObject": false,
"generateCompleteIconSet": true,
"srcFiles": ["./src/icons/*.svg"],
"outputDirectory": "./dist/icons",
"interfaceName": "DinosaurIcon",
"typeName": "dinosaurIcon",
"prefix": "dinosaurIcon",
"svgoConfig": {
"plugins": ["cleanupAttrs"]
}
}
}
conversionType: files
"@angular-extensions/svg-icons-builder:svg-icons-files-builder"
"generate-icons": {
"builder": "@angular-extensions/svg-icons-builder:svg-icons-files-builder",
"options": {
"conversionType": "files",
"srcFiles": ["./projects/dinosaur-icons/icons/**/*.svg"],
"outputDirectory": "./dist/dinosaur-icons/icons",
"interfaceName": "DinosaurIcon",
"generateType": false,
"generateTypeObject": false,
"generateCompleteIconSet": false,
"exportCompleteIconSet": false,
"fileName": "dinosaur-icons",
"iconsFolderName": "dinosaur-icons",
"objectName": "dinosaur-icons",
"typeName": "dinosaurIcon",
"prefix": "dinosaurIcon",
"modelFileName": "dinosaur-icons",
"barrelFileName": "index",
"svgoConfig": {
"plugins": ["cleanupAttrs"]
},
"compileSources": true
}
}
conversionType: object
"@angular-extensions/svg-icons-builder:svg-icons-object-builder"
"generate-icons": {
"builder": "@angular-extensions/svg-icons-builder:svg-icons-object-builder",
"options": {
"conversionType": "object",
"srcFiles": ["./projects/dinosaur-icons/icons/**/*.svg"],
"outputDirectory": "./dist/dinosaur-icons/icons",
"fileName": "dinosaur-icons",
"objectName": "dinosaur-icons",
"svgoConfig": {
"plugins": ["cleanupAttrs"]
},
"compileSources": true
}
}
In order to run the builder you have to add a new npm script to your package.json
. Replace name-of-your-app
with the name of your application 😉.
"genrate-icons": "ng run name-of-your-app:generate-icons"
Thanks goes to these wonderful people (emoji key):
Kayla Altepeter 💻 🐛 📖 🤔 ⚠️ | Kevin Kreuzer 💻 🐛 📖 🤔 ⚠️ |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
The svg-icons-builder is a Angular builder for the svg-to-ts project
The npm package @angular-extensions/svg-icons-builder receives a total of 1,231 weekly downloads. As such, @angular-extensions/svg-icons-builder popularity was classified as popular.
We found that @angular-extensions/svg-icons-builder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.