Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

.sketch document

Sketch stores documents in .sketch format, a zipped archive of JSON formatted data and binary data such as images.

Sketch file format schemas and APIs.

This project contains the file format specification and APIs to work with Sketch documents and document elements in TypeScript.

  • @sketch-hq/sketch-file-format: JSON Schema describing the .sketch document format.
  • @sketch-hq/sketch-file-format-ts: TypeScript types to strongly type objects representing Sketch documents, or fragments of Sketch documents in TypeScript projects.
  • @sketch-hq/sketch-file: TypeScript APIs to read and write .sketch files.

Development

Pre-release

ℹ️ This section is work in progress until we release our first pre-release. Pre-releases will be used as a staging area to publish changes to the specification required by an as-yet unreleased version of the Sketch Mac app.

  1. Create a new branch to track the pre-release, e.g. v5
  2. Read the changesets pre-release docs
  3. Enter pre-release mode on the branch yarn changeset pre enter {tag}
  4. Commit the changes and push the branch. This branch will act as a stand-in for main for all work related to the pre-release
  5. PR into the new branch with feature branches, calling yarn changeset as per normal to signal intents to publish. Since this is a pre-release it's likely that we'll be marshalling a major version bump
  6. Publishing pre-releases is not automated, so when you're ready to publish the pre-release call yarn changeset version and then yarn release

Release

  1. Following changes, run yarn changeset on the feature branch to document changes.
  2. If changes have been made to the @sketch-hq/sketch-file-format make sure to include @sketch-hq/sketch-file-format-ts in the changeset.
  3. On merge, changesets will produce a release pull-request named Version Packages with all changes since the last release.
  4. Merge the release pull-request maintained by the changesets GitHub Action to publish new releases to NPM.