1.4.0 • Published 3 years ago

@nuxtclub/octicons v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@nuxtclub/octicons

Setup

  1. Add @nuxtclub/octicons dependency to your project
npm i -D @nuxtclub/octicons
  1. 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.

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.

{
	"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.

Example

<template>
	<div v-html="$octicons['home'].toSVG()"></div>
</template>

Component

Now you can also use the auto-imported component in your .vue files.

<template>
	<octicons name="home" size="64">
</template>

Learn more about Octicons here.

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago