### Install Dependencies and Build
Source: https://github.com/ionic-team/ionicons/blob/main/CONTRIBUTING.md
Install project dependencies using npm and run the initial build. This ensures your development environment is set up correctly.
```bash
npm install
npm run build
```
--------------------------------
### Install and Use LTS Node.js Version
Source: https://github.com/ionic-team/ionicons/blob/main/CONTRIBUTING.md
Installs the latest Long Term Support (LTS) version of Node.js and sets it as the active version. This is a common step in environment setup.
```bash
nvm install --lts && nvm use --lts
```
--------------------------------
### Clone and Setup Ionicons Repository
Source: https://github.com/ionic-team/ionicons/blob/main/CONTRIBUTING.md
Clone your fork of the Ionicons repository and set up the upstream remote. This is the first step in setting up your local development environment.
```bash
git clone https://github.com/YOUR-USERNAME/ionicons.git
cd ionicons
git remote add upstream https://github.com/ionic-team/ionicons.git
```
--------------------------------
### Install Ionicons via NPM
Source: https://context7.com/ionic-team/ionicons/llms.txt
Install the ionicons package for use in bundled projects like React, Vue, or Angular.
```bash
npm install ionicons
```
--------------------------------
### Preview ion-icon Component Locally
Source: https://github.com/ionic-team/ionicons/blob/main/scripts/readme.md
Start a local development server to preview the `ion-icon` component in action. This is useful for testing icon rendering and component behavior.
```sh
npm start
```
--------------------------------
### Install Node Version Manager (macOS/Linux)
Source: https://github.com/ionic-team/ionicons/blob/main/CONTRIBUTING.md
Installs nvm, a Node.js version manager, using a curl script. Recommended for managing Node.js versions on macOS and Linux.
```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
```
--------------------------------
### Install Ionicons Web Component
Source: https://github.com/ionic-team/ionicons/blob/main/readme.md
Include these scripts to enable the Ionicons web component. Replace 'latest' with a specific version if needed.
```html
```
```html
```
--------------------------------
### Update Branch from Upstream
Source: https://github.com/ionic-team/ionicons/blob/main/CONTRIBUTING.md
Before starting new work or to keep your branch up-to-date, pull the latest changes from the upstream repository and create a new feature branch.
```bash
git checkout main
git pull upstream main
git checkout -b your-feature-branch
```
--------------------------------
### Internal SVG Sanitization Logic
Source: https://context7.com/ionic-team/ionicons/llms.txt
This TypeScript comment outlines the internal sanitization process: `