Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 862 Bytes

README.en_US.md

File metadata and controls

31 lines (20 loc) · 862 Bytes

中文 | English

npm

Preview the svg file.

image

Installation

NPM

npm add svg-to-component-preview

Usage

  • Return the module path, and the temporary storage directory of the React component saved
import { packagePath, componentsPath } from 'svg-to-component-preview';

console.log(packagePath, componentsPath);

// Start preview
spawn(`pnpm`, ['run', 'start'], {
    cwd: previewPackagePath,
    stdio: 'inherit',
});