Building and using opticons

Now that glyphicons have been phased out in Bootstrap 4, I needed an alternative and found opticons.

To install it:
First install Node Package Manager (npm):

curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
apt-get install nodejs
wget https://github.com/primer/octicons/archive/v5.0.1.zip
unzip v5.0.1.zip
cd octicons-5.0.1/

Now we need to edit the json to prevent npm from aborting saying that opticons cant be installed as a dependency of itself.
emacs package.json
Change the line:

"name": "octicons",

To

"name": "octicons-test",

Now continue:
npm install octicons –save
npm run build

Now the required files are available at ./build/


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.