This file contains hidden or 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
@import 'common.js' | |
var onRun = function(context) { | |
//reference the sketch document | |
var doc = context.document; | |
//reference what is selected | |
var selection = context.selection; | |
//make sure something is selected |
This file contains hidden or 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
@import 'common.js' | |
var onRun = function(context) { | |
//reference the sketch document | |
var doc = context.document; | |
//reference what is selected | |
var selection = context.selection; | |
//make sure something is selected |
This file contains hidden or 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
@import 'common.js' | |
var onRun = function(context) { | |
//reference the Sketch Document | |
var doc = context.document; | |
} |
This file contains hidden or 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
{ | |
"name" : "My Plugin", | |
"identifier" : "my.plugin", | |
"version" : "1.0", | |
"description" : "My First Sketch Plugin", | |
"authorEmail" : "[email protected]", | |
"author" : "Your Name", | |
"commands" : [ | |
{ |
This file contains hidden or 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
var pages = [doc pages]; | |
for (var i = 0; i < pages.count(); i++){ | |
var page = pages[i]; | |
var artboards = [page artboards]; | |
} |
This file contains hidden or 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
var pages = [doc pages]; | |
for (var i = 0; i < pages.count(); i++){ | |
var page = pages[i]; | |
var artboards = [page artboards]; | |
for (var z = 0; z < artboards.count(); z++){ | |
var artboard = artboards[z]; | |
var layers = [artboard layers]; | |
This file contains hidden or 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
var pages = [doc pages]; | |
for (var i = 0; i < pages.count(); i++){ | |
var page = pages[i]; | |
var artboards = [page artboards]; | |
for (var z = 0; z < artboards.count(); z++){ | |
var artboard = artboards[z]; | |
var layers = [artboard layers]; | |
This file contains hidden or 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
var onRun = function(context) { | |
//reference the Sketch Document | |
var doc = context.document; | |
//reference all the pages in the document in an array | |
var pages = [doc pages]; | |
//loop through the pages of the document | |
for (var i = 0; i < pages.count(); i++){ |
This file contains hidden or 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
var onRun = function(context) { | |
//reference the Sketch Document | |
var doc = context.document; | |
//reference all the pages in the document in an array | |
var pages = [doc pages]; | |
//loop through the pages of the document | |
for (var i = 0; i < pages.count(); i++){ |
This file contains hidden or 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
var onRun = function(context) { | |
//reference the Application | |
var app = [NSApplication sharedApplication]; | |
//reference the Sketch Document | |
var doc = context.document; | |
//reference all the pages in the document in an array | |
var pages = [doc pages]; |
OlderNewer