@kalimahapps/vue-icons
Version:
70,000+ SVG icons of popular icon sets that you can add seamlessly to vue projects
47 lines (37 loc) • 2.59 kB
Markdown
# Developer Guide
## Initial Setup
- Clone the repository
- Run `pnpm install` to install dependencies
- Run `pnpm submodules:init` to initialize submodules (icon fonts packages)
> [!IMPORTANT]
> Be aware that submodules size is very large (20GB) so ensure that you have sufficient disk space and a stable internet connection.
> [!IMPORTANT]
> Ensure `"git.detectSubmodules": false,` is set in your VSCode settings to prevent performance issues when working with submodules.
## Daily Development
- Run `pnpm check-updates` to see if there are any repo updates
- Run `pnpm submodules:update` to update submodules (icon fonts packages)
- Run `pnpm icons:generate` to generate icons
> [!IMPORTANT]
> `pnpm icons:generate` requires Github token to access API for fetching version information of icon font packages. Ensure that `config.js` file is created at the root of the project with the following content:
> ```js
> export default {
> access_token: 'your_github_token_here'
>};
> ```
> [!IMPORTANT]
> `pnpm icons:generate` generates version information in `scripts/version.json`. It pulls some of the latest version information from github api. This file is required when checking for icon packages updates. If submodules are not updated before running this command, there will be version mismatches. It is recommended that submodules are updated before running this command. Alternatively, you can run undo file changes in `scripts/versions.json` after running this command.
- Run `pnpm build:nuxt-module` to build nuxt module
- Run `pnpm build:vite-plugin` to build vite plugin
- Run `pnpm build:unplugin` to build unplugin resolver
- Run `pnpm build:mcp` to build mcp server
- Run `pnpm build` to run all build scripts
# Testing
- Run `pnpm icons:generate` before running tests. This will ensure that the latest icons are built and available for testing.
- Run `pnpm test` to run all tests.
- Run vitest with `-u` to update snapshots
- `test/icons-list.json` is generated by tests. It is used to check if icons are missing or added. Once you are satisfied with the changes, you can run remove it and run `pnpm test` again to regenerate the file (by running `pnpm test`). This will ensure that the file is up to date with the latest icons.
# Publishing
- Once `pnpm icons:generate` is run, the icons are built and ready to be published.
- Run `pnpm publish` to publish the package
> [!NOTE]
> github actions are not viable since build process requires github token to access repos version information. It will complicate the process. So we will use a manual process for now.