0.1.3 • Published 10 months ago

@medienwerft/svg-data-generator v0.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

svg data generator

generates useful svg related code like sprites, enum and a storybook's story (angular specific) from a given svg folder.

Installing

npm install @medienwerft/svg-data-generator --save-dev

Usage

Create config

In the root of your project add a .svgdatageneratorrc.json file and add the following content and replace the values:

{
  "svgDir": "path/to/svg/folder/",
  "svgSpritesPath": "path/to/sprites/<file_name>.svg",
  "svgModel": {
    "path": "path/to/models/<file_name>",
    "enumName": "<enumName>"
  },
  "svgStorybook": {
    "storyName": "<storyName>",
    "componentPath": "path/to/angular/component/<component_name>",
    "path": "path/to/story/<file_name>"
  }
}

Use

run the following command to your package.json scripts:

{
  "generate-svg-data": "generate-svg-data"
}

now you can run:

npm run generate-svg-data
0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago