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-core-assistant

v6.5.0

Published

This Assistant contains the official Sketch rule set.

Downloads

565

Readme

sketch-assistant-core-rules

This Assistant contains the official Sketch rule set.

It's a "rules only" Assistant, meaning it contains only rule implementations and no configuration. Adding this Assistant to Sketch won't do anything because rules need to be activated in configuration before they will report anything.

Make use of this Assistant by extending from it in your own Assistants and adding configuration for the rules listed below.

Available rules

This Assistant exports the following rules. Click the links to view their documentation, configuration options and implementation.

Development

This section of the readme deals with development only. If you're just here to install Assistants in Sketch you can safely ignore this section.

Ensure you've followed the Getting Started section in the root README. Having done so the following scripts should work in this folder.

| Script | Description | | ----------------- | ----------------------------------------------- | | yarn build | Builds the Assistant to the dist folder | | yarn i18n:extract | Extracts strings from the JS source to PO files | | yarn test | Runs the Jest tests |

Working on rules

Use a TDD approach, and the existing rules as a guide.

Rule functions can run in Node against plain Sketch file JSON, so the Mac Sketch app isn't required while actively developing rule logic.

When creating a new rule in this repository:

  1. Copy and paste one of the existing rule folders in src/ as a starting point.
  2. Add the new rule to the Assistant definition in src/index.ts.
  3. With Sketch, create some example .sketch files to use as test fixtures. At a minimum these should demonstrate two scenarios - one where you'd expect your rule to report violations, and one where it shouldn't report any
  4. While developing your rule and its tests use Jest in watch mode: yarn test --watch.
  5. If you've added new strings then follow the internationalization workflow too.
  6. Add changeset for your rule, open a Pull Request and once merged release it

Internationalization

This Assistant is internationalized since it's an official Sketch Assistant. We need any user facing strings to display in the correct language. Translating your own Assistants is completely optional however.

Internationalization is handled by LinguiJS, and follows their guides for handling plain JavaScript projects.

The following locales are currently supported in the Sketch Mac app and this project:

  • en (American English)
  • zh-Hans (Chinese Simplified)

When ready to perform a round of translation, for example when there are new untranslated strings in the repository, perform the following workflow:

  1. Run yarn i18n:extract which will update the .po files in src/locale/ with the new strings used throughout the source code.
  2. PR and merge these changes to main.
  3. Translation thereafter happens via CrowdIn automation.