-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit for public sketchplugin repo
- Loading branch information
0 parents
commit 660fd33
Showing
8 changed files
with
5,459 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"> | ||
<channel> | ||
<title>Represent Sketch Plugin</title> | ||
<link>https://getrepresent.com/</link> | ||
<description>Present your UX/UI Designs lightning fast on client's devices without leaving Sketch. 📲</description> | ||
<language>en</language> | ||
<item> | ||
<title>💻 You wanted it. Now you get it. represent supports Webdesign Sessions incl. Retina Support. 💥</title> | ||
<enclosure url="https://session.getrepresent.com/represent.sketchplugin-v1.2.1.zip" sparkle:version="1.2.1"/> | ||
</item> | ||
<item> | ||
<enclosure url="https://session.getrepresent.com/represent.sketchplugin-v1.2.0.zip" sparkle:version="1.2.0"/> | ||
</item> | ||
<item> | ||
<enclosure url="https://session.getrepresent.com/represent.sketchplugin-1.1.1.zip" sparkle:version="1.1.1"/> | ||
</item> | ||
<item> | ||
<enclosure url="https://session.getrepresent.com/represent.sketchplugin-1.1.zip" sparkle:version="1.1"/> | ||
</item> | ||
<item> | ||
<enclosure url="https://session.getrepresent.com/represent.sketchplugin-1.0.zip" sparkle:version="1.0"/> | ||
</item> | ||
</channel> | ||
</rss> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
represent.sketchplugin | ||
src | ||
!src/manifest.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Represent Sketch Plugin | ||
|
||
Present your UX/UI Designs lightning fast on client's devices without leaving Sketch. 📲 | ||
Exports the selected artboard and makes it available on your client's mobile phone. | ||
|
||
_It was created using `skpm`. For a detailed explanation on how things work, checkout the [skpm Readme](https://github.com/skpm/skpm/blob/master/README.md)._ | ||
|
||
## Usage | ||
|
||
Download the "Hello World" example or [clone the repo](https://github.com/BohemianCoding/SketchAPI): | ||
|
||
```bash | ||
curl https://codeload.github.com/BohemianCoding/SketchAPI/tar.gz/develop | tar -xz --strip=2 SketchAPI-develop/examples/hello-world | ||
cd hello-world | ||
``` | ||
|
||
Install the dependencies | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
Once the installation is done, you can run some commands inside the project folder: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
To watch for changes: | ||
|
||
```bash | ||
npm run watch | ||
``` | ||
|
||
Additionally, if you wish to run the plugin every time it is built: | ||
|
||
```bash | ||
npm run start | ||
``` | ||
|
||
## Debugging | ||
|
||
To view the output of your `console.log`, you have a few different options: | ||
|
||
* Use the [`sketch-dev-tools`](https://github.com/skpm/sketch-dev-tools) | ||
* Open `Console.app` and look for the sketch logs | ||
* Look at the `~/Library/Logs/com.bohemiancoding.sketch3/Plugin Output.log` file | ||
|
||
Skpm provides a convenient way to do the latter: | ||
|
||
```bash | ||
skpm log | ||
``` | ||
|
||
The `-f` option causes `skpm log` to not stop when the end of logs is reached, but rather to wait for additional data to be appended to the input | ||
|
||
|
||
## Defining The Action Handler | ||
|
||
In the manifest, we told Sketch that every time the `SelectionChanged` action finishes, we want it | ||
to run the onSelectionChanged handler in our `represent.js` script file. | ||
|
||
So now we need to put some code into the `represent.js` file to define that handler and make it do something useful. | ||
@example Selection Changed available at [GitHub](https://github.com/BohemianCoding/SketchAPI/tree/develop/examples/selection-changed) |
Oops, something went wrong.