Swiftpack.co - jjotaum/Chroma as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by jjotaum.
jjotaum/Chroma 0.4
A command line tool to auto generate .swift extensions or structs files from .xcassets on your iOS, macOS & SwiftUI projects.
⭐️ 4
🕓 1 week ago
macOS
.package(url: "https://github.com/jjotaum/Chroma.git", from: "0.4")

Chroma

A command line tool to auto generate .swift extensions or structs files from .xcassets on your iOS, macOS & SwiftUI projects.

Usage

$ Chroma --help

USAGE: chroma --asset <asset> --path <path> [--type <type>] [--platform <platform>]

OPTIONS:
  -a, --asset <asset>     The path of .xcasset file. 
  -p, --path <path>       The path of the generated .swift file. 
  -t, --type <type>       Specifies generated file type.
                          Supported values: "extension","struct". (default:
                          extension)
  --platform <platform>   Specifies the platform compatibility of the exported
                          file.
                          iOS, macOS, swiftUI (default: iOS)
  -h, --help              Show help information.

Installation

Clone Chroma on your machine:

$ git clone https://github.com/jjotaum/Chroma.git

Navigate to it's directory:

$ cd Chroma

Execute install script

$ ./install.sh

Chroma should now be installed on /usr/local/bin and can be accessed via terminal.

$ chroma

GitHub

link
Stars: 4
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

0.4
1 week ago
  • Bump swift-tool-version to 5.5, package & project main structure clean up.
  • Refactor chroma arguments to receive asset path and exported file path to make it work on a more standard and less risky way.
  • Clean up on unit tests setup.
  • Update swift-argument-parser version to 1.1.2.
  • Update folder file creation method to throw an error instead of causing a fatal error.
  • Update Chroma description on Readme file

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics