0.2.2 • Published 1 year ago

@factorial/stack-svg v0.2.2

Weekly downloads
123
License
MIT
Repository
github
Last release
1 year ago

@factorial/stack-svg

This is the SVG plugin for @factorial/stack-core.

It adds

Installation

You can install it via:

yarn factorial init

or manually via:

yarn add @factorial/stack-svg

Make sure it is added to your .factorialrc.js like this:

// .factorialrc.js

module.exports = {
  use: [require("@factorial/stack-svg")],
};

Usage

In your .factorialrc.js add a svgFolders key with an array of folders that contain your SVG files:

// .factorialrc.js

module.exports = {
  svgFolders: ["icons"], // relative to your rootFolder
};

optimize

yarn factorial optimize

This task will go over all SVG files found in your svg folders and optimize them (remove unnecessary attributes, whitespace, etc.).

NOTE: This tasks overwrites your SVG files!

sprite

yarn factorial sprite

This task will create a SVG sprite for each of your svg folders. If you e.g. have a svg folder src/svgs/icons, it will create src/svgs/icons.sprite.svg.

If you have multiple svg folders, you can also create just a single sprite via:

yarn factorial sprite --folder path/to/your/folder

The path to your folder would be relative from your working directory.

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

2 years ago

0.1.18

2 years ago

0.1.15

2 years ago

0.1.16

2 years ago

0.1.17

2 years ago

0.1.14

2 years ago

0.1.13

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

4 years ago

0.1.0

4 years ago