This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple node file to remove fill attribute from svg (for using in angular, mat icon, or other...) | |
// External libraries needed: "xmldoc": "^1.1.2" | |
const fs = require('fs'); | |
const xmldoc = require('xmldoc'); | |
const removeFillAttrRecursively = (node)=> { | |
if(node?.attr?.fill){ | |
delete node.attr.fill; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Better DateTimeFormatOptions types | |
* | |
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat for representation details | |
*/ | |
export interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions { | |
localeMatcher?: 'best fit' | 'lookup'; | |
weekday?: 'long' | 'short' | 'narrow'; | |
era?: 'long' | 'short' | 'narrow'; | |
year?: 'numeric' | '2-digit'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npx -p @angular/cli ng new hello-world-project | |
then locally can run | |
npx ng g c hello-world-component | |
OlderNewer