Skip to content

Generate assets for the mobile application #3496

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

Closed
rosen-vladimirov opened this issue Mar 26, 2018 · 5 comments
Closed

Generate assets for the mobile application #3496

rosen-vladimirov opened this issue Mar 26, 2018 · 5 comments
Assignees
Labels
Milestone

Comments

@rosen-vladimirov
Copy link
Contributor

Please, provide the details below:

Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?

Yes

Tell us about the problem

When creating NativeScript project, it comes with predefined assets (icons and splash screens). At some point all assets should be changed with specific ones for the application. It would be great if CLI allows generation of these images based on a new image.

Which platform(s) does your issue occur on?

Both

Please provide the following version numbers that your issue occurs with:

  • CLI: Not applicable
  • Cross-platform modules: Not applicable
  • Runtime(s): Not applicable
  • Plugin(s): Not applicable

Please tell us how to recreate the issue in as much detail as possible.

No

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

No

@rosen-vladimirov rosen-vladimirov added this to the 4.0.0 milestone Mar 26, 2018
@rosen-vladimirov rosen-vladimirov self-assigned this Mar 26, 2018
@rosen-vladimirov
Copy link
Contributor Author

The feature is implemented in both rc and next versions of NativeScript CLI. We have introduced two new commands:

$ tns resources generate icons <path to image>
$ tns resources generate splashes <path to image> [--background <color>]

In order to get more information how to use both commands, you can use:

$ tns help resources generate icons
$ tns help resources generate splashes

NOTE: At the moment the generation will work based on the current images in App_Resources, i.e. it will generate the same number of images with the same size as the ones you have in your App_Resources.

@Natalia-Hristova
Copy link

<background> is a valid path to an image that will be used as a background of the splashscreen. Defaults to white in case it is not specified.

Is this the current behaviour?
Because I tried with path to image and the result was: Unable to parse color from string: /.../images/some-bg.png
And it works when set color as a string e.g. yellow

@Natalia-Hristova
Copy link

Natalia-Hristova commented Mar 30, 2018

This feature is implemented and will be available in the next official release. Can be tested out with the rc or next version of nativescript-cli

@tjvantoll
Copy link
Contributor

@rosen-vladimirov Tried this out and it works great! Just as one quick fyi the new command does not appear in tns help at all.

@akoua
Copy link

akoua commented Dec 13, 2018

@rosen-vladimirov, the new image which I generate have the same name <> so it's replace my original icon image

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

No branches or pull requests

4 participants