-
Notifications
You must be signed in to change notification settings - Fork 127
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
Don't copy font files into "assets" android folder after "react-native link" #89
Comments
👋 there - as stated in the README and the issue template, this repo is for long-form discussions. Yours seems more a precise feature request, so I suggest you use Canny instead. That said, the CLI is been extracted so may be worth posting this issue on the new react-native-cli repo -> https://github.com/react-native-community/react-native-cli |
@kelset ok, thanks. |
I am actually wondering whether Canny is a good direction for issues like that - this sounds like a change that affects the workflow of every Android developer and might be worth discussing, just like CocoaPods support. Thoughts? Either way, this is not really a CLI issue, but a React Native one. The default React Native template (and all React Native apps) are done the way that requires copying assets. CLI just automates that behaviour to make it less annoying. We should continue the discussion in the React Native repository itself. I didn't know there was a way to change it. @punksta - I like first idea with a Gradle task - it would avoid copying assets over yet provide same benefits. If you'd be willing to give this a go - I am happy to give you a helping hand and tell where to start. |
uhm ok I see your point, I'll reopen for now. And yes, we need to align on Canny next week. |
@grabbou I think it's needed to choose a implementation approach. if we've made a gradle task which copies all resources to https://github.com/unimonkiez/react-native-asset - this library is creating
We can reuse this approach for android with automatic gradle linking. The So I see next ways for now.
|
It's perfectly fine if |
@punksta love that approach. Meaning the linking will not be moving files around that need to be committed and so on, right? Just that |
@grabbou alright. That's not difficult to make/extend the gradle tasks in rn core. How we sync this change with react-native-cli? it must stop linking fonts for android when gradle task is done. Is there anything else which requires attention? |
We will take care of making sure CLI doesn't link manually when Gradle
changes are out in a particular React Native version, so don't worry about
that for now.
…On Tue, 12 Mar 2019 at 11:49 Stanislav Shakirov ***@***.***> wrote:
@grabbou <https://github.com/grabbou> alright. That's not difficult to
make/extend the gradle tasks in rn core. How we sync this change with
react-native-cli? it must stop linking fonts for android when gradle task
is done. Is there anything else which requires attention?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACWcxlTp7ciIs7xZw-Gf3VUBranSBp48ks5vV4ZCgaJpZM4aOhZf>
.
|
@grabbou I'll send pl soon |
CC: @bartolkaruza @Salakar - do you think these changes are something we could incorporate directly into For context, @punksta, we have recently worked on improving the Android linking experience (called auto linking), here's PR: react-native-community/cli#258 that you can check for more info. |
@grabbou This could be in the CLI gradle file yes (though won't cover anyone not using it) |
This just landed. |
Introduction
react-native link
is copping all fonts into assets folder for android.For ios it is registering font files in ios project file without making files copies.
The Core of It
I don't want to store copies of all fonts in android assets folder.
Discussion points
There are few ways of solving this:
node_modules/react-native/react.gradle
which will copy font files in "generated/assets" in build time. So fonts will be synced automatically same as images.I don't know is something similar possible for ios (registering fonts files in build time, without changing source code files)
link
command could just create text file file with font paths to track them instead of making copies. We can add this file to git. And then gradle task adds only fonts from this file, not all of them.What do you think?
The text was updated successfully, but these errors were encountered: