MaterialDesign-Angular-Material icon indicating copy to clipboard operation
MaterialDesign-Angular-Material copied to clipboard

New release?

Open Ghostbird opened this issue 1 year ago • 2 comments

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?

Ghostbird avatar Mar 12 '24 08:03 Ghostbird

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.

Ghostbird avatar Mar 12 '24 12:03 Ghostbird

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.

Ghostbird avatar Mar 12 '24 15:03 Ghostbird