aeirola / react-native-svg-asset-plugin

Asset plugin for importing SVG images in React Native
https://www.npmjs.com/package/react-native-svg-asset-plugin
MIT License
68 stars 9 forks source link

Added ignorePatterns and includePatterns options #41

Closed papigers closed 4 years ago

papigers commented 4 years ago

Solves #40

These options cannot be used together.

aeirola commented 4 years ago

Thanks for the PR! In general looks good, but would maybe be good to discuss the configuration format a bit.

The react-native default tooling, such as jest (https://jestjs.io/docs/en/configuration#testregex-string--arraystring), flow (https://flow.org/en/docs/config/ignore/) and metro (https://facebook.github.io/metro/docs/configuration/#blacklistre) all seem to prefer using RegExps over other formats such as the .gitignore pattern. So while I also personally do like the gitignore pattern format, I'm a bit cautious about deviating from the convention set by the react native tooling.

What kind thoughts does this provoke for a fellow react native developer?

papigers commented 4 years ago

For me personally glob patterns are more readable and easier to understand. But I see where you're coming from, I'll try to update the PR tomorrow to use regex instead.

papigers commented 4 years ago

Hope that's better :)

aeirola commented 4 years ago

Thanks again. I'll do some chores on the repo, and the release this promptly.

aeirola commented 4 years ago

This is now released in version 0.4.0. Thanks again for the help!

papigers commented 4 years ago

Awesome! Thank you!