Easily work with sketch templates on Git, by having a script that updates them from your repository
Last active
February 20, 2016 19:44
-
-
Save jeroenvisser101/a772e86565fd414b8cc5 to your computer and use it in GitHub Desktop.
Copy Sketch templates from git repository to the Sketch template folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# script/sketch: Updates the sketch templates with the repo's templates. | |
TARGET_PATH = File.expand_path("~/Library/Application Support/com.bohemiancoding.sketch3/Templates") | |
Dir["./design/templates/*.sketch"].each do |file| | |
source = File.expand_path(file) | |
target = File.join(TARGET_PATH, File.basename(file)) | |
File.delete(target) if File.exists?(source) | |
File.symlink(source, target) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment