🚨 Shai-Hulud Strikes Again:More than 500 packages and 700+ versions compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@nycopportunity/pttrn-plugin-feather

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nycopportunity/pttrn-plugin-feather

A plugin script for the @NYCOpportunity Pattern CLI that will compile a feather icon sprite from the source.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
4
Created
Source

Patterns CLI Feather Plugin

This command plugin will compile a SVG icon sprite from the Feather Icon set.

Usage

Install as a development dependency in a project that uses the Patterns CLI.

$ npm install @nycopportunity/pttrn-plugin-feather -D

Add a proxy command script in the ./bin/ directory:

$ touch bin/feather.js
$ echo "module.exports = require('@nycopportunity/pttrn-plugin-feather');"

This will make the command available to the CLI. Compile the sprite by running:

$ npx pttrn feather
$ ✨ Feather sprite written to ./dist/svg/feather.svg

An optional config file can be added with the following options:

OptionDescription
srcThe source directory for Feather icons.
distThe distribution path and file name for the compiled sprite.
extThe extension name for the icons files (this shouldn't change).
prefixThe prefix to add to the <svg> element ID attribute.

Config Sample

const path = require('path');

module.exports = {
  'src': path.join(process.env.PWD, 'node_modules/feather-icons/dist/icons'),
  'dist': path.join(process.env.PWD, 'dist', 'svg', 'feather.svg'),
  'ext': '.svg',
  'prefix': 'feather-'
};

FAQs

Package last updated on 21 Jan 2021

Did you know?

Socket

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.

Install

Related posts