Giter Club home page Giter Club logo

astro-snippets's Introduction

Astro Snippets

This extension is a set of Snippets for Astro. They are created so that scaffolding with Astro can be easy. You can try to remember most of these but. Before reading the full snippets down below. The snippets are made so that you write your HTML before writing your scripts and styles.

Basic Snippets


Expression Snippets

I created list for you to understand the fundamental things about these snippets.

  • base stands for scaffold

  • cbase stands for scaffolding client instead of server script

  • frag stands for fragment

  • gsp stands for getStaticPaths

  • tern stands for ternary

  • gc stands for getCollections

  • cmp stands for component

  • pg stands for page

  • pr-pg stands for pre-rendered page

  • clt stands for col lec tion

  • anfn stands for anonymous function

Features

Here is a table with a list of all the snippets you can use. Hope this is helpful.

Astro Snippets

Snippet Purpose
a:iige Immediately Invoked Generator Expression
a:iife Immediately Invoked Function Expression
a:base Astro Single File Component
a:cbase Astro Single File Component w Client Script
a:base-hmf This is a header footer main snippet
a:frag--html This is a fragment with set html
a:frag--slot This is a fragment with a slot name in it
a:frag--slot--anfn A fragment slot with a function to return HTML
a:base-pr-pg This is a pre-rendered page snippet
a:base-pr-pg--gsp This is a pre-rendered page with getStaticPaths Setup
a:base-gsp This is a page snippet with getStaticPaths
a:base-gsp--gc Scaffold for Get Collections With getStaticPaths
a:base-cmp This is a basic Astro components
a:base-cmp--cs This is an Astro component with a client script
a:base-lpg This a page with layout scaffolding
a:base-lpg--hmf Layout Page with Header and Footer slot
a:tern A ternary expression scaffold
a:map This is a simple map expression for Astro
a:map--anfn This is a map expression for Astro using a anonymous function

Javascript Snippets

Snippet Purpose
a:base-cc This is for scaffolding a Collection Config
a:clt This is the single collection setup
a:clt--data This is the single data collection setup with relations

Recommendations

Please use these snippets along with these extensions:

  • TS?X Snippets
  • Auto Rename Tag
  • Astro (duh)

astro-snippets's People

Contributors

louiss0 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.