/sketch-parser

Parse sketchapp document

Primary LanguageJavaScriptMIT LicenseMIT

sketch-parser

Eliminate the differences in the output of the following two ways:

  • run sketchtool
  • unzip .sketch and read .json

version Node.js Sketch.app document Build Status

Class: Parser

new Parser(filePath, [needSketchTool])

  • filePath <String>
  • [needSketchTool] <Boolean>

Creates a new Parser object.

And sets the parser.filePath property to the provided sketch file path, maybe sets the parser.needSketchTool property to the provided option.

parser.needSketchTool

  • needSketchTool <Boolean>

Whether or not need sketchtool to get data, the default value is true.

parser.getDocumentData();

Returns a whole document's data.

parser.getPageDataList();

Returns a list containing all the page data.

license

MIT