0.1.1-alpha.5 • Published 4 years ago

get-repo-images v0.1.1-alpha.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

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

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 get-repo-images will be useful for anyone maintaining images at scale.

StatusOwnerHelp
Experimental@polaris-teamNew issue

How to use

Start a website at at http://localhost:3000 to browse, sort and filter images from alex-page/alexpage.com.au

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

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

$ npx 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 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 get-repo-images -repo alex-page/alexpage.com.au -token TOKEN

Advanced usage

To get the images from multiple repositories, specific image extensions, minimum image sizes you can add more options to the repos.config.json:

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

Technical details

get-repo-images is built using the following technologies:

0.1.1-alpha.5

4 years ago

0.1.1-alpha.4

4 years ago

0.1.0-alpha.20

4 years ago

0.1.0-alpha.19

4 years ago

0.1.0-alpha.18

4 years ago

0.1.0-alpha.17

4 years ago

0.1.0-alpha.16

4 years ago

0.1.0-alpha.15

4 years ago

0.1.0-alpha.14

4 years ago

0.1.0-alpha.13

4 years ago

0.1.0-alpha.12

4 years ago

0.1.0-alpha.11

4 years ago

0.1.0-alpha.10

4 years ago

0.1.0-alpha.9

4 years ago

0.1.0-alpha.8

4 years ago

0.1.0-alpha.7

4 years ago

0.1.0-alpha.5

4 years ago

0.1.0-alpha.4

4 years ago

0.1.0-alpha.3

4 years ago

0.1.0-alpha.2

4 years ago

0.1.0-alpha.1

4 years ago