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

fix: cli trying to transform directories #856

Merged
merged 1 commit into from Nov 28, 2021
Merged

fix: cli trying to transform directories #856

merged 1 commit into from Nov 28, 2021

Conversation

Esemesek
Copy link
Collaborator

Motivation

Running linaria CLI with a glob wildcard produced an error if the directory contains nested folders.

 /build
    /components
      /SomeComponent.js
    /index.js
 /src
    /components
      /SomeComponent.tsx
    /index.ts


yarn linaria -o build -r src -i build ./src/**/*

Summary

Simply check if the file is a directory before we run any transformations.

Test plan

It works with nested directories - scenario presented above. There is no unit testing set up for @linaria/cli so I skipped adding test cases for this.

@Anber Anber merged commit 14d9edd into master Nov 28, 2021
@Anber
Copy link
Collaborator

Anber commented Nov 28, 2021

Thank you @Esemesek!

@Anber Anber deleted the fix/cli-transform branch November 28, 2021 11:05
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

Successfully merging this pull request may close these issues.

None yet

2 participants