1.0.1 • Published 7 months ago

@eventstore-ui/icon-manager v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

@eventstore-ui/icon-manager

Automated icon inclusion for Event Store design system.

Install

yarn add --dev @eventstore-ui/icon-manager

Usage

Global options

OptionDescription
--helpDisplay help for this command
--versionDisplay the current version

Add

icon add [name]

Adds an icon with the specified name to the specified directory, updating the index file

Positionals

OptionDescriptionRequiredType
nameThe name of your icon (Will be converted to pascal case)yesstring

Options

OptionAliasDescriptionRequiredType
--dir-dWhere to store your iconsyespath
--file-fTake the SVG from a file path. Absolute, or relative to the current working directory.path
--clipboard-cTake the SVG from the clipboard. Can have a file in your clipboard, or the svg data.boolean
--forceOverwrite existing icons or aliasesboolean

Examples

Add MyIcon.tsx to ./icons from ./svg-icon.svg

icon add MyIcon --dir=./icons --file=./svg-icon.svg

Add MyIcon.tsx to ./icons from clipboard

icon add MyIcon --dir=./icons -c

Display help

icon add --help

Remove

icon remove [name]

Removes the icon or alias with the specified name from specified directory, updating the index file

Positionals

OptionDescriptionRequiredType
nameThe name the icon to removeyesstring

Options

OptionAliasDescriptionRequiredType
--dir-dWhere your icons are storedyespath

Examples

Remove MyIcon from ./icons

icon remove MyIcon --dir=./icons

Display help

icon remove --help

Alias

icon alias [name] [alias]

Aliases the icon with the specified name from specified directory, updating the index file

Positionals

OptionDescriptionRequiredType
nameThe name the icon to aliasyesstring
aliasThe name you want to aliasyesstring

Options

OptionAliasDescriptionRequiredType
--dir-dWhere your icons are storedyespath

Examples

Remove MyIcon from ./icons

icon alias MyIcon YourIcon --dir=./icons

Display help

icon alias --help

Namespace

icon namespace [namespace]

Sets or removes the namespace of the icons in the directory. Prefix namespace with @@ to use a symbol. Omit namespace to remove the currently set namespace.

Positionals

OptionDescriptionRequiredType
namespaceThe namespace to set.nostring

Options

OptionAliasDescriptionRequiredType
--dir-dWhere your icons are storedyespath

Examples

Set namespace in ./icons to the string "myNamespace".

icon namespace myNamespace --dir=./icons

Set namespace in ./icons to a symbol exported as constant MY_NAMESPACE.

icon namespace @@myNamespace --dir=./icons

Remove namespace in ./icons.

icon namespace --dir=./icons

Display help

icon namespace --help

Upgrade

icon upgrade

Upgrades from an earlier version on icon-manager & @eventstore-ui/components

Options

OptionAliasDescriptionRequiredType
--dir-dWhere your icons are storedyespath
--forceForces an upgrade, even if version numbers match.boolean

Examples

Update icon set in ./icons

icon upgrade --dir=./icons

Display help

icon upgrade --help

Regenerate

icon regenerate

Regenerate your index from icons.json

Options

OptionAliasDescriptionRequiredType
--dir-dWhere your icons are storedyespath

Examples

Regenerate icon set in ./icons

icon upgrade --dir=./icons

Display help

icon regenerate --help

Display

Display icons in browser.

Options

OptionAliasDescriptionRequiredTypeDefault
--dir-dWhere your icons are storedyespath
--port-pWhich port to host onnumber8080
--watch-wWatch for changesbooleantrue

Examples

Launch display server for icon set in ./icons, on localhost:2022, watching for changes.

icon display --dir=./icons --port 2022

Don't watch for changes.

icon display --dir=./icons --watch false

Display help

icon display --help

Pro tip

Add icon as a script in your package.json, set the directory for your project

package.json

{
    "scripts": {
        "icon": "icon --dir=./src/icons"
    }
}

usage

yarn icon add MyIcon -c
1.0.1

7 months ago

1.0.0

10 months ago

0.1.8

10 months ago

0.1.7

11 months ago

0.1.4

1 year ago

0.1.6

12 months ago

0.1.5

1 year ago

0.1.0

1 year ago

0.1.2

1 year ago

0.1.0-rc.1

1 year ago

0.1.1

1 year ago

0.1.3

1 year ago

0.1.0-alpha.16

1 year ago

0.1.0-alpha.15

1 year ago

0.1.0-alpha.17

1 year ago

0.1.0-alpha.12

2 years ago

0.1.0-alpha.11

2 years ago

0.1.0-alpha.14

1 year ago

0.1.0-alpha.13

1 year ago

0.1.0-alpha.10

2 years ago

0.1.0-alpha.9

2 years ago