TopGit / Chanzhaoyu/svelte-5-snippets SNAPSHOT GITHUB
Chanzhaoyu/svelte-5-snippets C TopGit repo profile for Chanzhaoyu/svelte-5-snippets, with GitHub repository stats and README context. Đánh giá Readme Prompt Clone Nhắc đến Bình luận
ĐÁNH GIÁ NHANH
13 sao GitHub và vẫn tăng — Chanzhaoyu/svelte-5-snippets là dự án đa ngôn ngữ mà TopGit đang theo dõi trên nền tảng. svelte 5 and svelte-kit snippets for vscode
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Snapshot Stars ★ 13
Forks ⑂ 2
Language —
Topic —
License MIT
Xem cách chúng tôi review ↗
Cộng tác viên hàng đầu Xem cộng tác viên hàng đầu Svelte 5 Snippets
This extension is a set of Snippets for Svelte. They are created so that scaffolding with Svelte can be easy. You can try to remember most of these.
Snippets Documentation
Prefix Description s-Svelte Snippets sk-Svelte-Kit Snippets
Svelte
s-base
<script lang="ts"></script>
<div></div>
<style></style>
s-base-component
<script lang="ts">
import type { Snippet } from "svelte";
let { children }: { children: Snippet } = $props();
</script>
<div>{@render children()}</div>
<style></style>
s-script
<script lang="ts"></script>
s-style
s-style-global
s-style-lang
s-if
s-if-else
s-if-else-if
{#if }
{:else if }
{:else}
{/if}
s-each
{#each items as item}
{/each}
s-each-else
{#each items as item}
{:else}
{/each}
s-each-index
{#each items as item, i}
{/each}
s-each-index-key
{#each items as item, i (item.id)}
{/each}
s-key
s-await
{#await promise}
{:then value}
{:catch error}
{/await}
s-debug
s-html
s-snippet
{#snippet name(value)}
{/snippet}
s-const
s-slot
s-slot-name
s-render
s-render-fallback
{#if children}
{@render children()}
{:else}
<span>default</span>
{/if}
s-bind-value
s-bind-this
s-transition-fade
transition:fade="{{delay: 250, duration: 300}}"
s-transition-blur
transition:blur="{{amount: 10}}"
s-transition-fly
transition:fly="{{delay: 250, duration: 300, x: 100, y: 500, opacity: 0.5, easing: quintOut}}"
s-transition-slide
transition:slide="{{delay: 250, duration: 300, easing: quintOut }}"
s-transition-scale
transition:scale="{{duration: 500, delay: 500, opacity: 0.5, start: 0.5, easing: quintOut}}"
s-transition-draw
transition:draw="{{duration: 5000, delay: 500, easing: quintOut}}"
s-animate-flip
animate:flip="{{delay: 250, duration: 250}}"
s-self
<svelte:self></svelte:self>
s-options
s-window
s-head
<svelte:head>
</svelte:head>
s-body
Svelte Kit
sk-page
import type { PageProps } from "./$types";
const { data }: PageProps = $props();
sk-page-data
import type { PageData, ActionData } from './$types';
const { data, form }: { data: PageData, form: ActionData } = $props();
sk-page-load
import type { PageLoad } from "./$types";
export const load: PageLoad = async (event) => {
return {};
};
sk-page-params
<script lang="ts">
import { page } from "$app/state";
const { id } = $derived(page.params);
</script>
sk-page-error
<script lang="ts">
import { page } from "$app/state";
</script>
<h1>{page.status}: {page.error.message}</h1>
sk-page-server-load
import type { PageServerLoad } from "./$types";
export const load: PageServerLoad = async (event) => {
return {};
};
sk-layout
<script lang="ts">
import type { LayoutProps } from './$types';
const { data, children }: LayoutProps = $props();
</script>
{@render children()}
sk-layout-load
import type { LayoutLoad } from "./$types";
export const load: LayoutLoad = async (event) => {
return {};
};
sk-layout-server-load
import type { LayoutServerLoad } from "./$types";
export const load: LayoutServerLoad = async (event) => {
return {};
};
sk-actions
import type { Actions } from "./$types";
export const actions: Actions = {
async default() {},
};
sk-hooks
import type { Handle } from "./$types";
export const handle: Handle = async ({ event, resolve }) => {
return resolve(event);
};
sk-json
json({ data: "" }, { status: 200 });
sk-error
error(404, { message: "Not found" });
sk-api-get
import type { RequestHandler, RequestEvent } from "./$types";
import { json } from "@sveltejs/kit";
export const GET: RequestHandler = (async ({ request }: RequestEvent) => {
return json({ message: "GET" });
});
sk-api-post
import type { RequestHandler, RequestEvent } from "./$types";
import { json } from "@sveltejs/kit";
export const POST: RequestHandler = (async ({ request }: RequestEvent) => {
return json({ message: "POST" });
});
sk-api-put
import type { RequestHandler, RequestEvent } from "./$types";
import { json } from "@sveltejs/kit";
export const PUT: RequestHandler = (async ({ request }: RequestEvent) => {
return json({ message: "PUT" });
});
sk-api-delete
import type { RequestHandler, RequestEvent } from "./$types";
import { json } from "@sveltejs/kit";
export const DELETE: RequestHandler = (async ({ request }: RequestEvent) => {
return json({ message: "DELETE" });
});
sk-api-patch
import type { RequestHandler, RequestEvent } from "./$types";
import { json } from "@sveltejs/kit";
export const PATCH: RequestHandler = (async ({ request }: RequestEvent) => {
return json({ message: "PATCH" });
});
sk-browser
import { browser } from "$app/environment";
if (browser) {
}
sk-env-private
import { env } from "$env/dynamic/private";
sk-env-public
import { env } from "$env/static/public";
sk-rf-import
import { } from '$app/server';
sk-rf-query
export const getItems = query(schema, async (payload) => {
});
sk-rf-form
export const formName = form(schema, async (payload) => {
});
sk-rf-command
export const commandName = command(schema, async (payload) => {
});
TypeScript / JavaScript
s-state
s-state-frozen
let state = $state.frozen();
s-state-snapshot
s-state-is
$state.is(state1, state2);
s-derived
const value = $derived();
s-derived-by
const value = $derived.by(() => {});
s-effect
s-effect-pre
s-effect-tracking
$effect(() => {
console.log("in effect:", $effect.tracking());
});
s-effect-root
const cleanup = $effect.root(() => {
$effect(() => {});
return () => {};
});
s-computed
let value = $state("");
let valueComputed = {
get value() {
return value;
},
set value(newValue) {
value = newValue;
},
};
s-props
interface Props {}
let {} = $props();
s-host
s-flush-sync
s-hook
export function useCounter() {
let count = $state(0);
function increment() {
count += 1;
}
return {
get count() {
return count;
},
set count(newValue) {
count = newValue;
},
increment,
};
}
s-store
import { writable } from "svelte/store";
export function createCounter() {
const { subscribe, update } = writable(0);
function increment() {
update((count) => count + 1);
}
return {
subscribe,
increment,
};
}
s-set-context
setContext("key", "value");
s-get-context
const context = getContext("key");
s-has-context
if (hasContext("key")) {
}
Css
s-css-global
License
MIT
CÂU HỎI THƯỜNG GẶP
Trả lời nhanh Chanzhaoyu/svelte-5-snippets có phải mã nguồn mở không? Có — Chanzhaoyu/svelte-5-snippets phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/Chanzhaoyu/svelte-5-snippets.
Chanzhaoyu/svelte-5-snippets có tag gì không? Bản đồng bộ chưa ghi nhận topic GitHub nào cho Chanzhaoyu/svelte-5-snippets. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
Chanzhaoyu/svelte-5-snippets có trang demo không? Dự án có trang chủ ở https://marketplace.visualstudio.com/items?itemName=Chanzhaoyu.svelte-5-snippets. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
Chanzhaoyu/svelte-5-snippets còn đang phát triển không? Commit gần nhất trên Chanzhaoyu/svelte-5-snippets là 5 tháng trước (theo timestamp GitHub). Repo có 2 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Chanzhaoyu/svelte-5-snippets dùng license gì? Chanzhaoyu/svelte-5-snippets phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc thêm về Chanzhaoyu/svelte-5-snippets ở đâu? Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/Chanzhaoyu/svelte-5-snippets là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
svelte-5-snippets có đáng để bạn bỏ thời gian? ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về svelte-5-snippets.