
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@netsells/nuxt-icons8
Advanced tools
A simple module to provide an Icons8 SVG spritesheet to your Nuxt app
This module aims to make it easier to integrate with Icons8 in a more uniform way, allowing you to simply pass in your SVG file and have it globally provided to your app.
Fonts are inherently bad, and are penalised by tools such as Google PageSpeed and Lighthouse as they are an additional request. Add to this issues with accessibility and general size of these files, it's highly recommended to use SVGs for application icons.
A global component will be registered in your app, and this can be referenced using the componentName
provided or app-icon
by default.
<template>
<app-icon name="email" />
</template>
<style lang="scss" scoped>
// SVG "fill" will use the font colour provided,
// and will inherit the current colour if not set
.app-icon {
color: red;
}
</style>
If the normaliseSpritesheet
option is set to true
the sprite sheet will automatically have all fill
attributes removed. This is because the fill
on the icons will be enforced by the font color
css value and inherited by currentColor
in the component CSS.
If set to false
for any reason, it can be enabled on a per-component basis using the :normalise="false"
prop on the component.
Install the module:
$ yarn add @netsells/nuxt-icons8
Add the module to your nuxt config:
modules: {
// Other modules
'@netsells/nuxt-icons8',
},
Configure the module to your needs:
icons8: {
spritePath: '',
componentName: '',
normaliseSpritesheet: true,
},
spritePath
Path to your svg spritesheet in your application
''
string
componentName
The name of the global icon component
'app-icon'
string
normaliseSpritesheet
Whether to apply normalisation to the spritesheet. See above for details
true
boolean
This component can be utilised in storybook by first doing a build of your nuxt app. This will generate the .nuxt
folder with the generated component from this module. You can then register it globally in your storybook project by simply pulling in the generated file:
import '../.nuxt/icons8/plugin';
FAQs
A simple module to provide an Icons8 SVG spritesheet to your Nuxt app
We found that @netsells/nuxt-icons8 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.