Skip to content

Instantly share code, notes, and snippets.

@marianomike
Last active August 27, 2016 17:23
Show Gist options
  • Save marianomike/bb5f1c331131945480c83421a80f2dda to your computer and use it in GitHub Desktop.
Save marianomike/bb5f1c331131945480c83421a80f2dda to your computer and use it in GitHub Desktop.
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++){
//reference each page
var page = pages[i];
//get the name of the page
var pageName = [page name];
//show the page name in the console
log(pageName);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment