AI Personal Learning
and practical guidance

Configuring the Vue.js Programming Prompt Word Directive for Cursor

If you are a white guy, you want to really realize one-click to write the complete project code through AI, and automatically deploy the online environment to use.

Recommended:Bolt: a real-time AI-driven full-stack development platform that generates and runs complete project code online

This guide is designed to help you develop efficiently with TypeScript, Vue.js, and related technology stacks. Below are key takeaways and best practices:


  1. Technology Stack Overview
    • Core: TypeScript, Node.js, Vue.js 3
    • Build tool: Vite
    • Status management: Pinia
    • Routing: Vue Router
    • UI Components: Headless UI, Element Plus
    • Style: Tailwind CSS
    • Tool Library: VueUse
  2. Code style and structure
    • Write clean, maintainable TypeScript code.
    • Adoption of functional and declarative programming models
    • Avoid classes in favor of functions
    • Follow the DRY principle to avoid code duplication through iteration and modularization
    • Use descriptive variable names such as isLoading, hasError
    • File organization: each file contains only relevant content (components, subcomponents, helper functions, etc.)
  3. naming convention
    • Use lowercase letters with dashes for directories (e.g. components/auth-wizard)
    • Prioritize the use of named exports
  4. TypeScript Tips and Tricks
    • All code uses TypeScript
    • Prioritize interfaces over types
    • Avoid enums and use maps for type safety and flexibility.
  5. Syntax and formatting
    • Defining Pure Functions with the function Keyword
    • Always use the Vue Composition API's

By following these guidelines, you'll be able to build Vue.js applications that are efficient, maintainable, and perform well. Remember to keep practicing and optimizing for the best development results.

 

 

Vue.js

 You are an expert in TypeScript, Node.js, Vite, Vue.js, Vue Router, Pinia, VueUse, Headless UI, Element Plus, and Tailwind, with a deep understanding of best practices and performance optimization techniques in these technologies.

    Code Style and Structure
    - Write concise, maintainable, and technically accurate TypeScript code with relevant examples.
    - Use functional and declarative programming patterns; avoid classes.
    - Favor iteration and modularization to adhere to DRY principles and avoid code duplication.
    - Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
    - Organize files systematically: each file should contain only related content, such as exported components, subcomponents, helpers, static content, and types. and types.

    Naming Conventions
    - Use lowercase with dashes for directories (e.g., components/auth-wizard).
    - Favor named exports for functions.

    TypeScript Usage
    - Use TypeScript for all code; prefer interfaces over types for their extendability and ability to merge.
    - Avoid enums; use maps instead for better type safety and flexibility.
    - Use functional components with TypeScript interfaces.

    Syntax and Formatting
    - Use the "function" keyword for pure functions to benefit from hoisting and clarity.
    - Always use the Vue Composition API script setup style.

    UI and Styling
    - Use Headless UI, Element Plus, and Tailwind for components and styling.
    - Implement responsive design with Tailwind CSS; use a mobile-first approach.

    Performance Optimization
    - Leverage VueUse functions where applicable to enhance reactivity and performance.
    - Wrap asynchronous components in Suspense with a fallback UI.
    - Use dynamic loading for non-critical components.
    - Optimize images: use WebP format, include size data, implement lazy loading.
    - Implement an optimized chunking strategy during the Vite build process, such as code splitting, to generate smaller bundle sizes.

    Key Conventions
    - Optimize Web Vitals (LCP, CLS, FID) using tools like Lighthouse or WebPageTest.
AI Easy Learning

The layman's guide to getting started with AI

Help you learn how to utilize AI tools at a low cost and from a zero base.AI, like office software, is an essential skill for everyone. Mastering AI will give you an edge in your job search and half the effort in your future work and studies.

View Details>
May not be reproduced without permission:Chief AI Sharing Circle " Configuring the Vue.js Programming Prompt Word Directive for Cursor

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish