Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not outputting files #39

Closed
MarijnBrosens opened this issue Jan 18, 2018 · 1 comment
Closed

Not outputting files #39

MarijnBrosens opened this issue Jan 18, 2018 · 1 comment

Comments

@MarijnBrosens
Copy link

Running:

"yarn svgr --icon --single-quote ./src/components/icons ./public/assets/images"

Output in console:

import React from "react";

const IcoAdd = props => (
  <svg width={24} height={24} viewBox="0 0 24 24" {...props}>
    <path
      fillRule="evenodd"
      d="M6 10.8h4.8V6h2.4v4.8H18v2.4h-4.8V18h-2.4v-4.8H6z"
    />
  </svg>
);

export default IcoAdd;

import React from "react";

const IcoBack = props => (
  <svg width={24} height={24} viewBox="0 0 24 24" {...props}>
    <path d="M11.488 7l1.423 1.414-3.088 3.088H19v1.996H9.823l3.088 3.088L11.488 18 6 12.5z" />
  </svg>
);

export default IcoBack;

but doesn't make files

@gregberge
Copy link
Owner

You omitted the -d (https://github.com/smooth-code/svgr#transform-a-whole-directory).

yarn svgr --icon --single-quote -d ./public/assets/images ./src/components/icons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants