From 5125f271f23feaaa401b5b9df47aaba3527fe122 Mon Sep 17 00:00:00 2001 From: Chris Watson Date: Wed, 16 Apr 2025 12:45:23 -0600 Subject: [PATCH] astro + script improvements --- cursor-rules-cli/rules.json | 4 + rules-mdc/astro.mdc | 326 ++++++++++++++++++------------------ rules.json | 4 + src/generate_mdc_files.py | 241 +++++++++++--------------- 4 files changed, 272 insertions(+), 303 deletions(-) diff --git a/cursor-rules-cli/rules.json b/cursor-rules-cli/rules.json index b2cd2bc..8ef1953 100644 --- a/cursor-rules-cli/rules.json +++ b/cursor-rules-cli/rules.json @@ -56,6 +56,10 @@ "name": "qwik", "tags": ["frontend", "framework", "javascript"] }, + { + "name": "astro", + "tags": ["frontend", "framework", "javascript", "ssr"] + }, { "name": "express", "tags": ["backend", "framework", "javascript", "nodejs"] diff --git a/rules-mdc/astro.mdc b/rules-mdc/astro.mdc index 68647f9..df9705a 100644 --- a/rules-mdc/astro.mdc +++ b/rules-mdc/astro.mdc @@ -1,168 +1,176 @@ --- -description: Comprehensive best practices and coding standards for Astro projects, including code organization, performance considerations, security, and testing. +description: This rule provides comprehensive best practices and coding standards for developing Astro projects. It covers code organization, performance, security, testing, and common pitfalls. globs: **/*.astro --- -- # Code Organization and Structure - - ## Directory Structure Best Practices - - `src/`: This is the heart of your Astro project. - - `components/`: Reusable UI elements. Organize components into subdirectories based on functionality or feature. - - `layouts/`: Components that define the overall page structure. Use a `BaseLayout.astro` to provide common elements like `` and `