This file contains 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
// Singleton instance | |
let instance; | |
// Singleton class | |
const Singleton = class Singleton { | |
constructor(params){ | |
// Instantiating instance as Singleton | |
if(!instance){ | |
instance = this; | |
} |
This file contains 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
#!/bin/bash | |
original=$1 | |
svgo $original | |
sed -i '.svg' 's/<style>[^<]*<\/style>//g; ;s/class="[^"]*" //g; s/ viewBox="[^"]*"//g; s/<svg/<g/g; s/<\/svg>/<\/g>/g; s/id="[^"]*" //g; s/ xmlns="[^"]*"//g' $original | |
rm $original.svg |