https://github.com/nuxtclub/octicons
An easy way to integrate Octicons with NuxtJS
https://github.com/nuxtclub/octicons
nuxt nuxt-module nuxt-modules nuxtjs octicons
Last synced: over 1 year ago
JSON representation
An easy way to integrate Octicons with NuxtJS
- Host: GitHub
- URL: https://github.com/nuxtclub/octicons
- Owner: nuxtclub
- License: mit
- Created: 2021-04-06T20:29:13.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-25T22:44:38.000Z (about 5 years ago)
- Last Synced: 2025-02-17T09:38:55.959Z (over 1 year ago)
- Topics: nuxt, nuxt-module, nuxt-modules, nuxtjs, octicons
- Language: Vue
- Homepage:
- Size: 212 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @nuxtclub/octicons
## Setup
1. Add `@nuxtclub/octicons` dependency to your project
```bash
npm i -D @nuxtclub/octicons
```
2. Add `@nuxtclub/octicons` to the `buildModules` section of `nuxt.config.js`
:warning: If you are using Nuxt **< v2.9** you have to install the module as a `dependency` (No `--dev` or `--save-dev` flags) and use `modules` section in `nuxt.config.js` instead of `buildModules`.
```javascript
export default {
buildModules: ['@nuxtclub/octicons'],
}
```
# Typescript support
Add the types to your `"types"` array in `tsconfig.json` after the `@nuxt/types` entry.
:warning: Use `@nuxt/vue-app` instead of `@nuxt/types` for nuxt < 2.9.
```json
{
"compilerOptions": {
"types": ["@nuxt/types", "@nuxtclub/octicons"]
}
}
```
## Usage
This module will inject \$octicons in the context of your application.
Using \$octicons you can access to an object with all the icons of the [Octicons Package](https://octicons-primer.vercel.app/octicons/packages/javascript).
## Example
```vue
```
## Component
Now you can also use the auto-imported component in your `.vue` files.
```vue
```
Learn more about Octicons [here](https://octicons-primer.vercel.app/octicons/).