Skip to content

Latest commit

 

History

History
40 lines (23 loc) · 1.05 KB

README.md

File metadata and controls

40 lines (23 loc) · 1.05 KB

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