1.1.4 • Published 3 months ago
svg-to-component-preview v1.1.4
运行svg预览器。
安装
NPM
npm add svg-to-component-preview
使用
- 返回模块路径,和预览svg组件的临时存储目录
import { packagePath, componentsPath } from 'svg-to-component-preview';
console.log(packagePath, componentsPath);
// 启动预览
spawn(`pnpm`, ['run', 'start'], {
cwd: previewPackagePath,
stdio: 'inherit',
});