svg-icons-builder
svg-icons-builder copied to clipboard
Add builder generation on install/add
Support installing or adding with --project flag to generate build-icons config in angular.json
Would be nice if schema matched the three possible conversionTypes.
Relates to #9
Sample for constants:
"update-icons": {
"builder": "@angular-extensions/svg-icons-builder:svg-icons-builder",
"options": {
"conversionType": "constants",
"srcFiles": ["./projects/dinosaur-icons/icons/**/*.svg"],
"outputDirectory": "./projects/dinosaur-icons/icons",
"interfaceName": "DinosaurIcon",
"typeName": "dinosaurIcon",
"prefix": "dinosaurIcon",
"modelFileName": "dinosaur-icons",
"svgoConfig": {
"plugins": [
{
"cleanupAttrs": true
}
]
},
"additionalModelFile": "./projects/dinosaur-icons/src/lib",
"compileSources": true
}
},
@kreuzerk thoughts on this?
Definitely. This would be very nice. It would be nice that the ng-add command asks for the various properties. I am not yet sure how we can make this conditional - so for example that ng-add asks you for the conversionType. Based on that it should then aks for the correct options and then automatically configure the builder in the angular.json
Yeah, I am not 100% certain either. It seems do-able to conditionally drive the builder called.