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

feat: introduce assets generation #3435

Merged
merged 10 commits into from
Mar 21, 2018
Merged

Commits on Mar 21, 2018

  1. feat: introduce assets generation

    Introduce ``generate-icons`` and ``generate-splashscreens`` commands to generate assets needed for iOS and Android.
    The operations are as follow:
     - Icons:
      - For all platforms we just resize the provided image.
     - Splash screens:
      - For Android we generate 2 png for each dpi: blank with background(background.png) and resized image based on provided image(logo.png). During the app start the logo overlays the background.
      - For iOS we generate 1 png for each dpi which has resized and centered image on the background.
    
    All resources with corresponding sizes and operations are described in image-definitions.ts.
    
    Added image-generation-test.png in order to provide easy way to test this functionality.
    
    For image resizing we use https://github.com/oliver-moran/jimp.
    ivanovit authored and rosen-vladimirov committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    bd1098d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6143320 View commit details
    Browse the repository at this point in the history
  3. Fixes after review

    ivanovit authored and rosen-vladimirov committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    9aabb6c View commit details
    Browse the repository at this point in the history
  4. Fix the linter

    ivanovit authored and rosen-vladimirov committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    5493cef View commit details
    Browse the repository at this point in the history
  5. Add platform parameter

    ivanovit authored and rosen-vladimirov committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    25f63c3 View commit details
    Browse the repository at this point in the history
  6. feat: Introduce methods to get current assets structure

    Introduce new methods in `projectDataService` to get the current assets strucuture. Use a predefined .json file in the resources to get information about image sizes.
    For iOS read the Contents.json file in specific iOS Resource directories.
    For Android - enumerate the files and construct required objects.
    
    Use the new method in the assetsGenerationService. Generate icons and splashes based on the argument.
    Require projectDir instead of resourcesDir for assets generation in order to get all CLI's specific files info (nsconfig, package.json, project location, etc.).
    
    Fix comands for generating assets to have mandatory command parameter - previously it had a non-mandatory param.
    Add newly exposed methods to the tests.
    rosen-vladimirov committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    075686c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5a97228 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b5e3bc9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d5bfec2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    dd2c26d View commit details
    Browse the repository at this point in the history