tiago-f2/vuejs-component-from-svg

A package to easily generate Vue icon components from SVG files.

v1.0.03 2023-07-16 18:46 UTC

This package is auto-updated.

Last update: 2024-10-11 21:07:30 UTC


README

A package to easily generate Vue icon components from SVG files.

composer require tiago-f2/vuejs-component-from-svg
  • If want to use dev version use dev-master tag
composer require tiago-f2/vuejs-component-from-svg:dev-master

Example

use TiagoF2\VuejsComponentFromSvg\Generator\GeneratorRunner;

require_once __DIR__ . '/vendor/autoload.php';

$initialClass = 'svg-icon-vue-component'; // CSS class on SVG tag
$componentPrefix = 'Custom';
$componentSufix = 'Icon';
$svgSourcePath = __DIR__ . '/svg';
$outputDir = __DIR__ . '/dist/tiago';

$generatorRunner = new GeneratorRunner(
    $svgSourcePath,
    $outputDir,
    // $initialClass, // Optional
    // $componentPrefix, // Optional
    // $componentSufix, // Optional
);

$generatorRunner->generateFiles();

TODO