npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sketch-hq/sketch-reference-files

v2.3.0

Published

A store of automatically generated Sketch file JSON organised by document version and Sketch feature

Downloads

984

Readme

sketch-reference-files

A store of automatically generated Sketch file JSON organised by document version and Sketch feature.

Overview

Sketch documents are stored as ZIP archives containing JSON encoded data. The file format was originally introduced in Sketch 43 and allows for better third-party integration. For example generating, reading and modifying documents without opening them in Sketch.

In order to provide concrete examples of how different Sketch features are serialised into JSON this repo maintains an archive of reference files.

It's published as an npm module to aid use cases that may involve importing these reference files as test fixtures.

Related projects

Usage

JavaScript

Add the npm module using npm or yarn

npm install @sketch-hq/sketch-reference-files
import files from '@sketch-hq/sketch-reference-files'

The module exports reference file metadata and json contents for each supported document version.

[
  {
    document: 121,
    sketchVersions: ['59', '60', '61'],
    files: [
      { id, name, description, data },
      ...
    ],
  },
  ...
]

HTTP

The raw reference file JSON can be accessed over HTTP via predicable urls:

  • https://unpkg.com/browse/@sketch-hq/sketch-reference-files@latest/files/

Development

This section of the readme is related to developing the reference file repo. If you just want to consume the reference file data you can safely ignore this.

Requirements

  • Yarn >= 1.13
  • Node 12.*.*

Scripts

| Script | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | yarn download-apps | Download and locally cache all Sketch app binaries needed to generate the files | | yarn generate-files | Generate reference files into the files/ folder. Existing reference files are skipped, so delete the files/ folder if you need to generate everything from scratch. This command needs to be run manually, and isn't part of the normal build | | yarn build | Builds the module into the the dist/ folder | | yarn changeset | Open an interactive CLI to add a changeset | | yarn commit | Open an interactive CLI to make a git commit in the conventional commits format |

Making changes

Adding reference files for a new Sketch version

  1. Update the scripts/config.ts file with metadata for the new Sketch version
  2. Run yarn download-apps to ensure you have the correct Sketch binaries available locally
  3. Run yarn generate-files to build the reference files
  4. PR your changes

Add a new reference file feature type

  1. Add plugin code to demonstrate the feature in features/. Use the other features as a guide
  2. Update the scripts/config.ts file with metadata for the file feature
  3. Run yarn download-apps to ensure you have the correct Sketch binaries available locally
  4. Run yarn generate-files to build the reference files
  5. PR your changes

Conventional commits

Try and use the conventional commits convention when writing commit messages. This isn't enforced, but you can use the yarn commit command (in place of git commit -m "foo") to open an interactive CLI to walk you through generating a properly formatted commit message.

Releases

This repo uses Atlassian Changesets to automate the npm release process. Read the docs for more information, but the top-level summary is:

  • A GitHub Action maintains a permanently open PR that when merged will publish the package to npm with the latest changes and an automatically determined semver
  • If the work you do in a PR should affect the next release, then you need to commit a "changeset" to the repo together with the rest of your code changes - do this by running yarn changeset. You'll be asked to provide a change type (major, minor or patch) and a message

Browse

⚠️ This section is automatically generated. Any manual edits will be erased during a build.

Document 123

Sketch versions: 62

| Feature | Document | Pages | Meta | User | | ---------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | Empty | 🔗 | 🔗 | 🔗 | 🔗 | | Groups | 🔗 | 🔗 | 🔗 | 🔗 | | Images | 🔗 | 🔗 | 🔗 | 🔗 | | Library styles | 🔗 | 🔗 | 🔗 | 🔗 | | Library symbols | 🔗 | 🔗 | 🔗 | 🔗 | | Prototypes | 🔗 | 🔗 | 🔗 | 🔗 | | Shape paths | 🔗 | 🔗 | 🔗 | 🔗 | | Shapes | 🔗 | 🔗 | 🔗 | 🔗 | | Symbol overrides | 🔗 | 🔗 | 🔗 | 🔗 | | Symbols | 🔗 | 🔗 | 🔗 | 🔗 | | Text | 🔗 | 🔗 | 🔗 | 🔗 | | Smart layout | 🔗 | 🔗 | 🔗 | 🔗 | | Blur | 🔗 | 🔗 | 🔗 | 🔗 | | Slice | 🔗 | 🔗 | 🔗 | 🔗 | | Export formats | 🔗 | 🔗 | 🔗 | 🔗 | | Variable font | 🔗 | 🔗 | 🔗 | 🔗 |

Document 121

Sketch versions: 59, 60, 61

| Feature | Document | Pages | Meta | User | | ---------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | Empty | 🔗 | 🔗 | 🔗 | 🔗 | | Groups | 🔗 | 🔗 | 🔗 | 🔗 | | Images | 🔗 | 🔗 | 🔗 | 🔗 | | Library styles | 🔗 | 🔗 | 🔗 | 🔗 | | Library symbols | 🔗 | 🔗 | 🔗 | 🔗 | | Prototypes | 🔗 | 🔗 | 🔗 | 🔗 | | Shape paths | 🔗 | 🔗 | 🔗 | 🔗 | | Shapes | 🔗 | 🔗 | 🔗 | 🔗 | | Symbol overrides | 🔗 | 🔗 | 🔗 | 🔗 | | Symbols | 🔗 | 🔗 | 🔗 | 🔗 | | Text | 🔗 | 🔗 | 🔗 | 🔗 | | Smart layout | 🔗 | 🔗 | 🔗 | 🔗 | | Blur | 🔗 | 🔗 | 🔗 | 🔗 | | Slice | 🔗 | 🔗 | 🔗 | 🔗 | | Export formats | 🔗 | 🔗 | 🔗 | 🔗 | | Variable font | 🔗 | 🔗 | 🔗 | 🔗 |

Document 120

Sketch versions: 58

| Feature | Document | Pages | Meta | User | | ---------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | Empty | 🔗 | 🔗 | 🔗 | 🔗 | | Groups | 🔗 | 🔗 | 🔗 | 🔗 | | Images | 🔗 | 🔗 | 🔗 | 🔗 | | Library styles | 🔗 | 🔗 | 🔗 | 🔗 | | Library symbols | 🔗 | 🔗 | 🔗 | 🔗 | | Prototypes | 🔗 | 🔗 | 🔗 | 🔗 | | Shape paths | - | - | - | - | | Shapes | 🔗 | 🔗 | 🔗 | 🔗 | | Symbol overrides | 🔗 | 🔗 | 🔗 | 🔗 | | Symbols | 🔗 | 🔗 | 🔗 | 🔗 | | Text | 🔗 | 🔗 | 🔗 | 🔗 | | Smart layout | 🔗 | 🔗 | 🔗 | 🔗 | | Blur | 🔗 | 🔗 | 🔗 | 🔗 | | Slice | 🔗 | 🔗 | 🔗 | 🔗 | | Export formats | 🔗 | 🔗 | 🔗 | 🔗 | | Variable font | - | - | - | - |

Document 119

Sketch versions: 55.2, 56, 56.1, 56.2, 56.3, 57, 57.1

| Feature | Document | Pages | Meta | User | | ---------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | Empty | 🔗 | 🔗 | 🔗 | 🔗 | | Groups | 🔗 | 🔗 | 🔗 | 🔗 | | Images | 🔗 | 🔗 | 🔗 | 🔗 | | Library styles | 🔗 | 🔗 | 🔗 | 🔗 | | Library symbols | 🔗 | 🔗 | 🔗 | 🔗 | | Prototypes | 🔗 | 🔗 | 🔗 | 🔗 | | Shape paths | 🔗 | 🔗 | 🔗 | 🔗 | | Shapes | 🔗 | 🔗 | 🔗 | 🔗 | | Symbol overrides | 🔗 | 🔗 | 🔗 | 🔗 | | Symbols | 🔗 | 🔗 | 🔗 | 🔗 | | Text | 🔗 | 🔗 | 🔗 | 🔗 | | Smart layout | - | - | - | - | | Blur | 🔗 | 🔗 | 🔗 | 🔗 | | Slice | 🔗 | 🔗 | 🔗 | 🔗 | | Export formats | 🔗 | 🔗 | 🔗 | 🔗 | | Variable font | - | - | - | - |

Document 118

Sketch versions: 55, 55.1

| Feature | Document | Pages | Meta | User | | ---------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | Empty | 🔗 | 🔗 | 🔗 | 🔗 | | Groups | 🔗 | 🔗 | 🔗 | 🔗 | | Images | 🔗 | 🔗 | 🔗 | 🔗 | | Library styles | 🔗 | 🔗 | 🔗 | 🔗 | | Library symbols | 🔗 | 🔗 | 🔗 | 🔗 | | Prototypes | 🔗 | 🔗 | 🔗 | 🔗 | | Shape paths | 🔗 | 🔗 | 🔗 | 🔗 | | Shapes | 🔗 | 🔗 | 🔗 | 🔗 | | Symbol overrides | 🔗 | 🔗 | 🔗 | 🔗 | | Symbols | 🔗 | 🔗 | 🔗 | 🔗 | | Text | 🔗 | 🔗 | 🔗 | 🔗 | | Smart layout | - | - | - | - | | Blur | 🔗 | 🔗 | 🔗 | 🔗 | | Slice | 🔗 | 🔗 | 🔗 | 🔗 | | Export formats | 🔗 | 🔗 | 🔗 | 🔗 | | Variable font | - | - | - | - |