diff --git a/README.md b/README.md index b23c7795..c5746008 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ * [ Illustrator](#-illustrator) * [Xcode Integration and Automation](#xcode-integration-and-automation) - + @@ -226,16 +226,20 @@ end -Speculid only supports being called through a command line terminal for now. Once you have copied the command to your */usr/local/bin* folder you should be able to access it easily. +**Speculid** only supports being called through a command line terminal for now. Once you have copied the command to your */usr/local/bin* folder you should be able to access it easily. ```bash +$ speculid # opens file dialog in macOS $ speculid --process +$ speculid --initialize $ speculid --help $ speculid --version Options: - --help Show this screen. - --version Show version. +--help Show this screen. +--version Show version. +--process Process the *.speculid file +--initialize ... Create a new .speculid file with the source image, set folder path, destination speculid files ``` ## File Format and Properties @@ -362,7 +366,14 @@ With **Speculid**, the process of building image assets can be automated in **Xc ![Xcode Target Membership](https://rawcdn.githack.com/brightdigit/Speculid/master/images/XcodeTargetMembership.png) - * *Note: you don't need to add these files to any target membership* + *Note: you don't need to add these files to any target membership* + + **NEW *skip to step 4* and use the `--initialize` flag:** + + ``` + $ speculid --initialize \ + "Assets.xcassets/iOS AppIcon.appiconset" geometry.svg app-icon.speculid + ``` 2. In the speculid file, **Add the property for the source** - the path to the SVG or PNG file. ```json @@ -406,11 +417,7 @@ With **Speculid**, the process of building image assets can be automated in **Xc 2. **Add the *Run Script* Build Phase** to the top of your project with the following code: ```bash - find "${SRCROOT}" -name "*.speculid" -print0 | - while IFS= read -r -d $'\0' line; do - speculid --process "$line" & - done - wait + speculid --process "${SRCROOT}" ``` ![Xcode Build Phase Run Script](https://rawcdn.githack.com/brightdigit/Speculid/master/images/XcodeBuildPhaseRunScript.jpg) @@ -434,7 +441,7 @@ With **Speculid**, the process of building image assets can be automated in **Xc ----- -**Speculid** ©2018, BrightDigit, LLC. +**Speculid** ©2020, BrightDigit, LLC. [sketch-step-1]: /images/svg-export/sketch/step-1.jpg "Sketch iOS App Icon Template Window" [sketch-step-2]: /images/svg-export/sketch/step-2.jpg "Sketch Slice Panel" diff --git a/images/XcodeBuildPhaseRunScript.jpg b/images/XcodeBuildPhaseRunScript.jpg index 9b89153e..b8c9af34 100644 Binary files a/images/XcodeBuildPhaseRunScript.jpg and b/images/XcodeBuildPhaseRunScript.jpg differ diff --git a/index.md b/index.md index 4b61708f..3d4200ed 100644 --- a/index.md +++ b/index.md @@ -202,13 +202,17 @@ end **Speculid** only supports being called through a command line terminal for now. Once you have copied the command to your */usr/local/bin* folder you should be able to access it easily. ```bash +$ speculid # opens file dialog in macOS $ speculid --process +$ speculid --initialize $ speculid --help $ speculid --version Options: - --help Show this screen. - --version Show version. +--help Show this screen. +--version Show version. +--process Process the *.speculid file +--initialize ... Create a new .speculid file with the source image, set folder path, destination speculid files ``` ## File Format and Properties @@ -335,7 +339,14 @@ With **Speculid**, the process of building image assets can be automated in **Xc ![Xcode Target Membership](/images/XcodeTargetMembership.png) - * *Note: you don't need to add these files to any target membership* + *Note: you don't need to add these files to any target membership* + + **NEW *skip to step 4* and use the `--initialize` flag:** + + ``` + $ speculid --initialize \ + "Assets.xcassets/iOS AppIcon.appiconset" geometry.svg app-icon.speculid + ``` 2. In the speculid file, **Add the property for the source** - the path to the SVG or PNG file. ```json @@ -379,11 +390,7 @@ With **Speculid**, the process of building image assets can be automated in **Xc 2. **Add the *Run Script* Build Phase** to the top of your project with the following code: ```bash - find "${SRCROOT}" -name "*.speculid" -print0 | - while IFS= read -r -d $'\0' line; do - speculid --process "$line" & - done - wait + speculid --process "${SRCROOT}" ``` ![Xcode Build Phase Run Script](/images/XcodeBuildPhaseRunScript.jpg) @@ -407,7 +414,7 @@ With **Speculid**, the process of building image assets can be automated in **Xc ----- -**Speculid** ©2019, BrightDigit, LLC. +**Speculid** ©2020, BrightDigit, LLC. [sketch-step-1]: /images/svg-export/sketch/step-1.jpg "Sketch iOS App Icon Template Window" [sketch-step-2]: /images/svg-export/sketch/step-2.jpg "Sketch Slice Panel"