├── .appcast.xml
├── .babelrc
├── .editorconfig
├── .eslintrc.yml
├── .github
└── CONTRIBUTING.md
├── .gitignore
├── .gitsketchrc
├── CHANGELOG.md
├── LICENSE
├── README.md
├── Resources
├── branches.css
├── branches.html
├── branches.js
├── preferences.css
├── preferences.html
└── preferences.js
├── assets
├── delete.svg
├── icon.png
└── icons
│ ├── branches.png
│ ├── commit.png
│ ├── pull.png
│ └── push.png
├── docs
├── FAQ.md
├── README.md
├── getting-started.md
├── git-commands.md
├── git-lfs.md
├── keyboard-shortcut.md
└── sketchignore.md
├── example
├── .exportedArtboards
│ └── example
│ │ ├── Artboard 1@0.5x.png
│ │ └── Rectangle@0.5x.png
├── .sketchignore
├── ScreenCast.gif
├── ScreenShotBad.png
├── ScreenShotNice.png
├── example-boards.md
└── example.sketch
├── logo.png
├── package-lock.json
├── package.json
├── src
├── commands
│ ├── Add.js
│ ├── Branches.js
│ ├── Commit.js
│ ├── Export.js
│ ├── Init.js
│ ├── OpenTerminal.js
│ ├── Preferences.js
│ ├── Pull.js
│ ├── Push.js
│ └── autoExportOnSave.js
├── common.js
├── exportArtboards.js
├── manifest.json
└── preferences.js
└── webpack.skpm.config.js
/.appcast.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": [
3 | [
4 | "transform-react-jsx",
5 | {
6 | "pragma": "h"
7 | }
8 | ]
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
--------------------------------------------------------------------------------
/.eslintrc.yml:
--------------------------------------------------------------------------------
1 | extends:
2 | - standard
3 | - standard-preact
4 | - plugin:import/warnings
5 | - plugin:import/errors
6 | - sketch
7 | - prettier
8 | plugins:
9 | - prettier
10 | parserOptions:
11 | ecmaVersion: 2017
12 | sourceType: module
13 | ecmaFeatures:
14 | jsx: true
15 | rules:
16 | import/no-unresolved: [2, { ignore: ["^sketch$"] }]
17 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Request for contributions
2 |
3 | Please contribute to this repository if any of the following is true:
4 | - You have expertise in community development, communication, or education
5 | - You want open source communities to be more collaborative and inclusive
6 | - You want to help lower the burden to first time contributors
7 |
8 | # How to contribute
9 |
10 | Prerequisites:
11 |
12 | - familiarity with [GitHub PRs](https://help.github.com/articles/using-pull-requests) (pull requests) and issues
13 | - knowledge of Markdown for editing `.md` documents
14 |
15 | In particular, this community seeks the following types of contributions:
16 |
17 | - ideas: participate in an Issues thread or start your own to have your voice
18 | heard
19 | - resources: submit a PR to add to [docs README.md](/docs/README.md) with links to related content
20 | - outline sections: help us ensure that this repository is comprehensive. If
21 | there is a topic that is overlooked, please add it, even if it is just a stub
22 | in the form of a header and single sentence. Initially, most things fall into
23 | this category
24 | - write: contribute your expertise in an area by helping us expand the included
25 | content
26 | - copy editing: fix typos, clarify language, and generally improve the quality
27 | of the content
28 | - formatting: help keep content easy to read with consistent formatting
29 | - code: Fix issues or contribute new features to this or any related projects
30 |
31 | # Conduct
32 |
33 | We are committed to providing a friendly, safe and welcoming environment for
34 | all, regardless of gender, sexual orientation, disability, ethnicity, religion,
35 | or similar personal characteristic.
36 |
37 | Please be kind and courteous. There's no need to be mean or rude.
38 | Respect that people have differences of opinion and that every design or
39 | implementation choice carries a trade-off and numerous costs. There is seldom
40 | a right answer, merely an optimal answer given a set of values and
41 | circumstances.
42 |
43 | Please keep unstructured critique to a minimum. If you have solid ideas you
44 | want to experiment with, make a fork and see how it works.
45 |
46 | We will exclude you from interaction if you insult, demean or harass anyone.
47 | That is not welcome behavior. We interpret the term "harassment" as
48 | including the definition in the
49 | [Citizen Code of Conduct](http://citizencodeofconduct.org/);
50 | if you have any lack of clarity about what might be included in that concept,
51 | please read their definition. In particular, we don't tolerate behavior that
52 | excludes people in socially marginalized groups.
53 |
54 | Private harassment is also unacceptable. No matter who you are, if you feel
55 | you have been or are being harassed or made uncomfortable by a community
56 | member, please contact [me](https://github.com/mathieudutour)
57 | immediately. Whether you're a regular contributor or a newcomer, we care about
58 | making this community a safe place for you and we've got your back.
59 |
60 | Likewise any spamming, trolling, flaming, baiting or other attention-stealing
61 | behavior is not welcome.
62 |
63 |
64 | # Communication
65 |
66 | GitHub issues are the primary way for communicating about specific proposed
67 | changes to this project.
68 |
69 | Please follow the conduct guidelines above. Language issues
70 | are often contentious and we'd like to keep discussion brief, civil and focused
71 | on what we're actually doing, not wandering off into too much imaginary stuff.
72 |
73 | # Frequently Asked Questions
74 |
75 | See [the FAQ docs page](/docs/FAQ.md)
76 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # build artefacts
2 | Git.sketchplugin
3 |
4 | # npm
5 | node_modules
6 |
7 | # Logs
8 | logs
9 | *.log
10 | npm-debug.log*
11 |
12 | # Optional npm cache directory
13 | .npm
14 |
--------------------------------------------------------------------------------
/.gitsketchrc:
--------------------------------------------------------------------------------
1 | {
2 | "exportFolder": ".exportedArtboards",
3 | "exportFormat": "png",
4 | "exportScale": "0.5",
5 | "includeOverviewFile": false,
6 | "autoExportOnSave": false
7 | }
8 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [0.11.3] - 2017-10-16
2 |
3 | * Fix NSArray error which blocked committing and generating files for diffs.
4 |
5 |
6 | ## [0.11.2] - 2017-05-25
7 |
8 | * URL-encode artboard image paths in the overview markdown (Thanks @mattjbray)
9 |
10 |
11 | ## [0.11.1] - 2017-05-05
12 |
13 | * Check if we are in a git repo before exporting the artboards (Thanks @yuchuanxi)
14 | * Add an option to export the artboards on save (Thanks @yuchuanxi)
15 |
16 |
17 | ## [0.11.0] - 2017-05-05
18 |
19 | * Fix export artboards when file name contains special character
20 | * Use a single sketchignore for entire repo which includes subdirectories
21 |
22 |
23 | ## [0.10.1] - 2017-04-18
24 |
25 | * Use webpack to compile everything instead of rollup. Should bring more stability.
26 | * Fix path to `exportArtboard.sh` script
27 |
28 |
29 | ## [0.10.0] - 2017-04-11
30 |
31 | * move export config to `.gitsketchrc` so that everybody working
32 | on the same file will have the same settings
33 | * fix the default config which could be break sometimes
34 | * fix exporting artboards when there is a space in the path to Sketch
35 |
36 |
37 | ## [0.9.2] - 2017-04-06
38 |
39 | * Added support for multiple file formats (png, jpg, pdf, eps, svg)
40 | for the pretty diff images (thanls @grrtbrtr)
41 |
42 |
43 | ## [0.9.1] - 2017-02-12
44 |
45 | * Update web-view dependency
46 |
47 |
48 | ## [0.9.0] - 2017-01-15
49 |
50 | * Add an overview md file next to each sketch file (thanks @philschatz)
51 | * Improve UI to manage preferences
52 |
53 |
54 | ## [0.8.5] - 2017-01-14
55 |
56 | * Fix typos causing a bunch of commands to fail (silly me) (thanks @philschatz)
57 |
58 |
59 | ## [0.8.4] - 2017-01-08
60 |
61 | * Add UI to manage branches
62 | * Make the plugin compatible with Sketch Runner
63 |
64 |
65 | ## [0.8.3] - 2016-12-01
66 |
67 | * Fix typo in analytics
68 | * Update build tools
69 |
70 |
71 | ## [0.8.2] - 2016-11-29
72 |
73 | * Fix a typo causing the fail alert not to show up
74 | * Optionally send anonymous usage data in order to improve the plugin
75 |
76 |
77 | ## [0.8.1] - 2016-11-25
78 |
79 | * More robust check for failure when executing a task
80 |
81 |
82 | ## [0.8.0] - 2016-11-25
83 |
84 | * Complete rewrite of the plugin using `sketch-builder`
85 | * Export symbols as well
86 |
87 |
88 | ## [0.7.4] - 2016-11-21
89 |
90 | * More lines for Commit: the first line is the commit message, all the others are an optional longer description
91 |
92 |
93 | ## [0.7.3] - 2016-10-03
94 |
95 | * fix non-ascii characters encoding (thanks @tomonari-t)
96 |
97 |
98 | ## [0.7.2] - 2016-09-08
99 |
100 | * fix when the path to the plugin has multiple spaces
101 |
102 |
103 | ## [0.7.1] - 2016-09-01
104 |
105 | * check if a file is open and send a helpful message if not
106 | * add a button to report the issue when one happens
107 |
108 |
109 | ## [0.7.0] - 2016-08-31
110 |
111 | * add option to exclude entire pages from pretty diffs
112 |
113 |
114 | ## [0.6.0] - 2016-08-27
115 |
116 | * check for new updates automatically
117 |
118 |
119 | ## [0.5.0] - 2016-08-27
120 |
121 | * add option to exclude artboards from pretty diffs
122 |
123 | * create a file called .sketchignore next to your sketchfiles
124 | * put the name of the artboards inside (see example). It can either be the exact name of the artboard or a regex
125 | * profit
126 |
127 |
128 | ## [0.4.0] - 2016-08-24
129 |
130 | * keep old generated artboards if not changed
131 | * add preference to control the scale of the exported artboards
132 |
133 |
134 | ## [0.3.5] - 2016-06-23
135 |
136 | * escape double quote in commit message
137 |
138 |
139 | ## [0.3.4] - 2016-05-30
140 |
141 | * fix missing argument in the export artboards function
142 |
143 |
144 | ## [0.3.3] - 2016-05-30
145 |
146 | * fix missing argument in the shared functions
147 |
148 |
149 | ## [0.3.2] - 2016-05-29
150 |
151 | * factorize cd into the current folder for every command
152 | * use `git for-each-ref` instead of `git branch + awk` to list the branches
153 |
154 |
155 | ## [0.3.1] - 2016-05-23
156 |
157 | * add preferences for the terminal to use
158 | * prefix user preferences by `gitSketch` to not conflict with others potentially
159 | * replace option of `push` (was `simple`, now `current`)
160 |
161 |
162 | ## [0.3.0] - 2016-05-21
163 |
164 | * add plugin preferences panel
165 | * add icon on alerts
166 | * open terminal with `iTerm` if available
167 | * add `pull` command
168 | * add default option for push
169 | * add popup to ask for the remote repository url
170 |
171 |
172 | ## [0.2.3] - 2016-04-18
173 |
174 | * use sketchtool from the bundle
175 |
176 |
177 | ## [0.2.2] - 2016-03-28
178 |
179 | * use user bah profile when running commands
180 |
181 |
182 | ## [0.2.1] - 2016-02-05
183 |
184 | * add checkbox to generate pretty diffs when commiting
185 |
186 |
187 | ## [0.2.0] - 2016-01-23
188 |
189 | * use sketchtool to generate pretty diffs
190 | * add command to add file to git
191 |
192 |
193 | ## [0.1.0] - 2016-01-22
194 |
195 | * first release
196 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Mathieu Dutour
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## This plugin was a first attempt to bring version control and collaboration to designers. Since then, Sketch evolved a lot and my new project takes advantages of them to unlock _true_ version control. Check it out: [http://kactus.io](http://kactus.io)
2 |
3 | ---
4 |
5 |
6 |
7 | # git-sketch-plugin
8 |
9 | [](https://github.com/mathieudutour/git-sketch-plugin/releases)
10 | [](http://bit.ly/SketchRunnerWebsite)
11 |
12 | A Git client built right into [Sketch](http://www.bohemiancoding.com/sketch). Generate [pretty diffs](https://github.com/mathieudutour/git-sketch-plugin/pull/1/files) so that everybody knows what are the changes!
13 |
14 | From ...
15 | 
16 |
17 | ... To
18 | 
19 |
20 | 
21 |
22 | ## Requirements
23 |
24 | - [Sketch](http://sketchapp.com/) >= 3.4 (**not** with the sandboxed version ie from the App Store).
25 | - [Git](https://git-scm.com/) (coming with OS X so you shouldn't have to do anything)
26 | - [Xcode Command Line Tools](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/)
27 |
28 | ## Installation
29 |
30 | ### From a release (simplest)
31 |
32 | - [Download](https://github.com/mathieudutour/git-sketch-plugin/releases/latest) the latest release of the plugin
33 | - Un-zip
34 | - Double-click on Git.sketchplugin
35 |
36 | ### From the sources
37 |
38 | - Clone the repo
39 | - Install the dependencies (`npm install`)
40 | - Build (`npm run build`)
41 | - Double-click on Git.sketchplugin
42 |
43 | ## Documentation
44 |
45 | For a Getting started guide, FAQ, etc. check out our [docs](https://github.com/mathieudutour/git-sketch-plugin/tree/master/docs)!
46 |
47 | ## Want to contribute?
48 |
49 | Anyone can help make this project better - check out our [Contributing guide](/.github/CONTRIBUTING.md)!
50 |
--------------------------------------------------------------------------------
/Resources/branches.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: -apple-system;
3 | background: white;
4 | padding-top: 20px;
5 | }
6 |
7 | .branch {
8 | opacity: 0.6;
9 | height: 25px;
10 | clear: both;
11 | }
12 |
13 | .branch.selected {
14 | opacity: 1;
15 | }
16 |
17 | .branch:hover {
18 | opacity: 1;
19 | }
20 |
21 | .name {
22 | cursor: pointer;
23 | }
24 |
25 | .delete {
26 | float: right;
27 | cursor: pointer;
28 | }
29 | .delete img {
30 | width: 15px;
31 | }
32 |
33 | .create {
34 | position: fixed;
35 | width: 100%;
36 | bottom: 0;
37 | left: 0;
38 | border: 0;
39 | border-radius: 0;
40 | height: 40px;
41 | background-image: linear-gradient(180deg, #8f779d, #613b75);
42 | color: white;
43 | letter-spacing: 0.3px;
44 | font-size: 13px;
45 | cursor: pointer;
46 | z-index: 1;
47 | }
48 |
49 | #container {
50 | margin-bottom: 70px;
51 | }
52 |
--------------------------------------------------------------------------------
/Resources/branches.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Branches
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Resources/branches.js:
--------------------------------------------------------------------------------
1 | import { h, render, Component } from "preact";
2 |
3 | function cleanBranchName(name) {
4 | return name ? name.replace("(B[m", "") : name;
5 | }
6 |
7 | class Branch extends Component {
8 | render({ name, selected }) {
9 | return (
10 |