This gulp task takes the asset output from Generate Mobile Assets in the Sketch plugin sketch-mobile-assets, optimizes them, and then sorts them in the output folders for iOS and Android that you define.
- You use Sketch
- You are designing for iOS and Android at the same time (one file creates assets for both platforms)
- You use
sketch-mobile-assetsto export your assets - You are familiar with the command line, NPM, and Gulp
Install gulp with these instructions
npm install gulp-imageminnpm install imagemin-pngquantnpm install merge-stream
sourceabsolute path to your asset output folder (where you save your assets from Generate Mobile Assets)iosabsolute path to your asset directory for your iOS projectandroidabsolute path to your asset directory for your Android project. optimize-assets will sort the files into the appropriatedrawableAndroid folders
In the directory that contains gulpfile.js, run gulp in the terminal
Oh yeah!!!