/AstroSpect

πŸš€ A Chrome DevTools extension for Astro developers πŸ§‘β€πŸš€

Primary LanguageAstroMIT LicenseMIT

AstroSpect


Logo

A Chrome DevTools Extension For Astro Developers
Explore AstroSpect Β»
Read our Medium Article Β»


Contributors Forks Stargazers MIT License Issues LinkedIn

Table of Contents
  1. Summary
  2. Getting Started
  3. About
  4. Roadmap
  5. Contributions
  6. Acknowledgments

Summary

AstroSpect (Astro Inspection) is a Chrome Developer Tool Extension that allows developers to inspect and debug Astro websites more efficiently. With AstroSpect, developers can display a tree diagram of all elements on a page, including static HTML files and hydrated components known as Astro Islands, on a panel. The "All Elements" tab shows all elements, while the "Islands Only" tab displays only Astro Islands. Clicking on an Astro Island reveals information about the component, such as its type, client directive, and props, in a side-pane. AstroSpect features expand and collapse options to open and close tree nodes and a search function for quicker navigation and debugging.

- Built With

Astro React Sass TypeScript Webpack


Getting Started

AstroSpect is available for download as a Google Chrome Extension. You can also clone or fork this repo and add it as your own extension manually.

- Prerequisites

  • Chrome Browser
  • Astro 2.0
  • VS Code

- Installation

Option 1: Download as a chrome extension

Option 2: Manually Download

  1. Fork or Clone this repo
  2. In the terminal: npm run build
  3. Navigate to chrome://extensions/
  4. Click Load unpacked button
  5. Upload the extension folder

- Usage

  1. Start or open an Astro project.
  2. Inspect the Astro webpage
  3. Open the AstroSpect Tab
  4. "ALL ELEMENTS" displays every element on the page
  5. "ISLANDS ONLY" displays hydrated components with client directives

Inspect

Astro Inspection

Expand & Collapse

Astro Expand and Collapse

Search

Astro Search


About

- Astro

Astro is the all-in-one web framework designed for speed. Pull your content from anywhere and deploy everywhere, all powered by your favorite UI components and libraries. AstroSpect allow developers to inspect the Island Architecture of Astro websites in conjunction with other frameworks (React, Preact, Svelte, Vue, Solid, Lit and more). Check out Astro to build your next website.


Roadmap

  • Inspect Astro Websites with AstroSpect Chrome Extension
  • Display all HTML elements in "All Elements" tab
  • Display Hydrated Components in "Islands Only" tab
  • Display Component's Type, Client Directive, and Props in side pane
  • Expand and Collapse feature opens and closes all tree nodes
  • Search feature highlights the inputted text
  • Tracking buttons that directs user to every highlighted word
  • Auto-reload when navigating to a different page
  • Display Framework associated with each island on side pane
  • Access nanostores of all components
  • Display state of components in side pane
  • Highlight over islands when clicked in the panel
  • Highlight over islands when clicked in the panel

Check out the open issues for a full list of proposed features (and known issues).


Contributions

All contributions are hightly welcomed and appreciated here at AstroSpect. We are open to suggestions so please submit an issue and the AstroSpect team will get back to you as soon as possible. If you would like to add a new feature, please follow the steps below.

STEP 1 β€” Fork and Clone the repository

git clone https://github.com/oslabs-beta/AstroSpect.git

STEP 2 β€” Create a Feature Branch

git checkout -b [name]/[feature-name]

STEP 3 β€” Install Dependencies

npm install

STEP 4 β€” Bundle the Code

npm run build

STEP 5 β€” Upload Extension Folder to Chrome

1. Navigate to chrome://extensions/ using chrome
2. Click Load unpacked button
3. Upload extension folder
4. Test Extension by inspecting an Astro webpage

STEP 6 β€” Add and Commit

git add [file-name]
git commit -m "describe your new feature"

STEP 7 β€” Submit a Pull Request

Merge your feature branch into dev

STEP 8 β€” Create an Issue

Click the Issues tab and create a new issue

Acknowledgments

- Community

Distributed under the MIT License. See LICENSE for more information.

- Authors

πŸ§‘πŸ»β€πŸš€

Evan Jones


πŸ§‘πŸΌβ€πŸš€

Nicholas Park


πŸ‘¨πŸ»β€πŸš€

John Roman


πŸ‘©πŸΌβ€πŸš€

Jackson Ta


(back to top)