MaterialDesign-Angular-Material
MaterialDesign-Angular-Material copied to clipboard
New release?
We use the NPM package, but since this is two major versions behind with the material design icons, I was wondering whether this is no longer recommended?
Or is the intention that users run the build.js in their package.json's postinstall hook? In that case, what use is the SVG itself? And in that case @mdi/svg and @mdi/util should be dependencies, not devDependencies.
We worked around the issue in this way:
# Copy @mdi/angular-material dev dependencies
npm install -D @mdi/svg @mdi/util
# Run @mdi/angular-material/build postinstall and copy result to assets.
jq '.scripts.postinstall = "node node_modules/@mdi/angular-material/build.js; mv mdi.svg src/assets/mdi.svg"' package.json | sponge package.json
# Add generated mdi.svg to .gitignore
printf "# Generated assets\n/src/assets/mdi.svg" >> .gitignore
Then update all references to mdi.svg in the angular.json to point to src/assets/mdi.svg.