Follow these steps to get the website and Chrome extension running on your local machine:
# Clone the repository
git clone https://github.com/primer/octicons-v2.git
cd octicons-v2
# Install the dependencies
yarn
# Start the development server
yarn start
# Navigate to http://localhost:8000 in your browser
Note: These steps require Yarn to be set up locally. See yarnpkg.com for more information.
Once you've started the local development server, follow these steps to load the extension into Chrome:
- Open Chrome and navigate to
chrome://extensions
. - Enable
Developer mode
using the toggle in the top right. - Click "Load unpacked".
- Find and select the
extension
directory from this project.
Note: You'll only need to load the extension once.
-
Start the development server:
yarn start
-
Place an SVG file in the
icons/
directory. -
Optimize the SVG:
yarn svgo
Tip: Open a new terminal session before running
yarn svgo
to avoid stopping the developement server. -
View your icon at http://localhost:8000.
-
Reload the
Octicons v2
extension in Chrome to see the icon on github.com. You can reload the extension fromchrome://extensions
but we recommend using the Extension Reloader extension because it allows you to reload unpacked extensions from the toolbar.