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 🙏

© 2026 – Pkg Stats / Ryan Hefner

astra-studio

v0.1.0

Published

Astra Studio "Odanda Gör" widget'ını web sitenize tek komutla kurar.

Readme

astra-studio

Astra Studio "Odanda Gör" widget'ını web sitenize tek komutla kurar.

npx astra-studio init --brand <marka-slug>

Araç projenizi tanır, eklenecek satırı renkli bir önizleme olarak gösterir ve onayınızı alır.

Komutlar

| Komut | Açıklama | | --- | --- | | npx astra-studio init --brand <slug> | Widget kodunu ekler; zaten varsa marka/adresi günceller (tekrar eklemez) | | npx astra-studio remove | Eklenen kodu her yerden kaldırır | | npx astra-studio doctor | Kodun hangi dosyalarda olduğunu ve widget.js adresine erişilebildiğini kontrol eder |

Seçenekler

  • --brand <slug> — Marka kısa adı (küçük harf, rakam, tire). Verilmezse sorulur.
  • --site <url> — Astra Studio adresi (varsayılan https://astrastudio.space).
  • --yes, -y — Onay sormadan uygula.
  • --dry-run — Yalnızca değişiklikleri göster.
  • --cwd <klasör> — Proje klasörü.
  • --help, --version

Desteklenen projeler

| Proje | Değişen dosya | | --- | --- | | Next.js App Router | app/layout.* — next/script ile <Script strategy="afterInteractive"> | | Next.js Pages Router | pages/_document.* <Head> içi (yoksa oluşturulur) | | Vite / CRA | index.html veya public/index.html | | Nuxt | nuxt.config.* → app.head.script | | Astro | src/layouts altında </head> içeren düzen | | SvelteKit | src/app.html | | Statik site | </head> içeren tüm .html dosyaları (node_modules, dist, build hariç) | | WordPress teması | header.php (ayrıca functions.php için wp_enqueue_script önerisi) | | Shopify teması | layout/theme.liquid | | Magento 2 teması | app/design/frontend/<Vendor>/<tema>/Magento_Theme/layout/default_head_blocks.xml (yoksa oluşturulur) | | Shopware 6 teması | src/Resources/views/storefront/layout/meta.html.twig → layout_head_javascript_tracking bloğu, {{ parent() }} korunur (yoksa oluşturulur; custom/plugins/* de taranır) | | PrestaShop teması | themes/<tema>/templates/_partials/head.tpl sonuna | | Joomla şablonu | templates/<şablon>/index.php → </head> öncesi | | Drupal teması | themes/custom/<tema>/templates/html.html.twig ya da templates/layout/html.html.twig → </head> öncesi (web/ ve docroot/ altında da aranır) |

Satır sonları (CRLF/LF) ve girinti korunur.

Tema tabanlı altyapılarla ilgili notlar

  • Magento 2: default_head_blocks.xml içindeki <script src="…"/> öğesi data-brand gibi data-* öznitelikleri yazamaz. Bu yüzden <body> bölümünde head.additional bloğuna, etiketi olduğu gibi basan bir Magento\Framework\View\Element\Text bloğu (astra.studio.widget) eklenir. Ardından bin/magento cache:flush.
  • Shopware 6: layout_head_javascript_tracking bloğu base.html.twig'de değil, <head>'i içeren layout/meta.html.twig'de tanımlıdır; bu yüzden o dosya sw_extends ile genişletilir. Blok temada zaten varsa kod {{ parent() }} satırından sonra eklenir. Ardından bin/console theme:compile ve bin/console cache:clear.
  • Drupal: Temada html.html.twig yoksa komut dosya oluşturmaz; core/modules/system/templates/html.html.twig dosyasını temaya kopyalayıp tekrar çalıştırın. Ardından drush cr.
  • Çok satırlı eklemeler astra-studio:start / astra-studio:end yorumları arasında durur; remove bu aralığı, komutun oluşturduğu dosyaları ise tamamen siler.

Çıkış kodları

0 başarılı · 1 genel hata · 2 hatalı kullanım · 3 proje tanınmadı · 4 kod bulunamadı · 5 iptal · 6 widget.js'e erişilemedi

Gereksinim: Node.js 18 veya üzeri.