@nycopportunity/pttrn-plugin-feather

1.0.2 • Public • Published

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:

Option Description
src The source directory for Feather icons.
dist The distribution path and file name for the compiled sprite.
ext The extension name for the icons files (this shouldn't change).
prefix The 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-'
};

Readme

Keywords

none

Package Sidebar

Install

npm i @nycopportunity/pttrn-plugin-feather

Weekly Downloads

0

Version

1.0.2

License

GPL-3.0+

Unpacked Size

40.3 kB

Total Files

4

Last publish

Collaborators

  • pashuntiy
  • kinjal_patel
  • sourabhc-nyco
  • products_nycopportunity
  • devowhippit