0.3.2 • Published 6 months ago

@shopify/get-repo-images v0.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@shopify/get-repo-images

  • ⚡️ An extremely fast repository crawler to find images across multiple repos
  • 🌌 Find where the images are referenced in code... or not!
  • 💾 Save the results to a JSON file
  • 🌏 Generate a Next.js website to browse, sort and filter images
  • 🪆 Sort by the file size, date created and number of references
  • 🔗 Read about Shopify's journey

As Shopify has scaled, our usage of illustrations in code has become fragmented across 6000+ repositories. We recently updated our illustration style and finding the illustrations, prioritising them, removing or updating them across our codebase was a challenge. We hope that @shopify/get-repo-images will be useful for anyone maintaining images at scale.

StatusOwnerHelp
Experimental@polaris-teamNew issue

How to use

Make sure you have Node.js version 14 or later, then run this command from your terminal to to browse, sort and filter images from alex-page/alexpage.com.au on a Next.js website at http://localhost:3000

npx @shopify/get-repo-images -repo alex-page/alexpage.com.au

Create the files for a Next.js website into the ./repo-images-site directory

npx @shopify/get-repo-images -build -repo alex-page/alexpage.com.au

Note: If you want to run the website you can run cd repo-images-site && npm i && npm run dev

Generate a JSON file with results to ./images.json

npx @shopify/get-repo-images -json -repo alex-page/alexpage.com.au

Private repositories

Add a personal access token for private repositories. Replace TOKEN with your token.

npx @shopify/get-repo-images -repo alex-page/alexpage.com.au -token TOKEN

Advanced usage

Create a repos.config.json file and use the -config flag to access advanced options. These allow you to get the images from multiple repositories, specific image extensions or allow minimum image sizes.

npx @shopify/get-repo-images -config
{
  "repos": [
    {
      "repo": "shopify/mobile",
      "minSize": 1000,
      "extensions": ["webp"],
      "usageMatchers": ["drawable"],
      "usageNoExtension": true
    },
    {"repo": "alex-page/harmonograph.art"},
  ]
}

Technical details

@shopify/get-repo-images is built using the following technologies:

0.3.0

6 months ago

0.2.7

6 months ago

0.2.6

6 months ago

0.3.2

6 months ago

0.3.1

6 months ago

0.1.14

3 years ago

0.1.12

3 years ago

0.1.13

3 years ago

0.1.1-3.alpha.1

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2-alpha.2

3 years ago

0.1.2-alpha.1

3 years ago

0.1.1-alpha.8

3 years ago

0.1.1-alpha.7

3 years ago

0.1.1-alpha.3

3 years ago

0.1.1-alpha.1

3 years ago

0.1.0

3 years ago

0.1.0-alpha.2

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago