.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.
- Create a new branch to track the pre-release, e.g.
v5
- Read the changesets pre-release docs
- Enter pre-release mode on the branch
yarn changeset pre enter {tag}
- 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 - 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 - Publishing pre-releases is not automated, so when you're ready to publish the
pre-release call
yarn changeset version
and thenyarn release
Release
- Following changes, run
yarn changeset
on the feature branch to document changes. - 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. - On merge, changesets will produce a release pull-request named Version Packages with all changes since the last release.
- Merge the release pull-request maintained by the changesets GitHub Action to publish new releases to NPM.