1.1.2 • Published 6 years ago

macos-folder-icons v1.1.2

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Create mac folder

npm GitHub license

A cli tool to create macOS style folders from SVG files.

  • 💩 No extra tools
  • 👻 No phantomjs
  • 👽 No node-canvas
  • 🎟 One http-server instance.
  • 🎟 One puppeteer instance.

Creates .png and .icns files from SVGs. Tested with various icon types via svg-icon. create-mac-folder will attempt to make all SVGs compatible though there are limitations of what can be done. Most SVGs will work just fine (See examples below).

Installation

npm install --global macos-folder-icons

Usage

OptionAliasTypeDefaultDescription
<input>n.a.stringn.a.Default command
--out-dir-ostring./macos-folder-iconsDefines the output directory
--ignore-istringundefinedDefines ignore patterns
--port-pnumber1337Change the port if 1337 is taken
--size-snumber424Change the size of the icon viewBox

Core options

OptionDescription
--helpprints help
--versionprints version

Single files

create-mac-folder path/to/my.svg

Multiple files

create-mac-folder one.svg two.svg
create-mac-folder '{one,two,four}.svg'
create-mac-folder 'path/to/my/*.svg'

Options

Input

Input is required. It allows using multiple strings or glob patterns,

  • Type: string

path/to/my.svg --> ./macos-folder-icons/my.svg

create-mac-folder path/to/my.svg

Glob patterns

Make sure to put your glob patterns in quotes '**/glob/*/pattern'.

create-mac-folder 'path/to/my/*.svg'

Out Dir

Defines the output directory relative to the current working directory (process.cwd()).

  • Type: string

path/to/my.svg --> ./out/my.svg

create-mac-folder path/to/my.svg -o out

Ignore

Defines files to ignore. Allows glob patterns and multiple definitions

Make sure to put your glob patterns in quotes '**/glob/*/pattern'.

  • Type: string

**/*.svg, !**/qux/*.svg, !foo/bar/baz.svg --> ./macos-folder-icons/*

create-mac-folder '**/*.svg' --ignore '**/qux/*.svg' --ignore 'foo/bar/baz.svg'

Port

Change the port in case 1337 is already in use

  • Type: number
create-mac-folder path/to/my.svg --port 3000

Size

Define the size of the icon. The default is optimized to use circular icons from svg-icon/simple (e.g. )

  • Type: number
create-mac-folder path/to/my.svg --size 300

Examples

Take a look at the Example files.

Input / Output

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago