-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsleepy-snippets.json
More file actions
82 lines (82 loc) · 1.77 KB
/
sleepy-snippets.json
File metadata and controls
82 lines (82 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"Basic Structure": {
"prefix": "sleepy-basic",
"body": [
"{app:",
"\tstyles:(",
"\t\t$1",
"\t),",
"\tfrontend:(",
"\t\t$2",
"\t),",
"\tapi:(",
"\t\t$3",
"\t),",
"\tdatabase:(",
"\t\t$4",
"\t)",
"}"
],
"description": "Basic SleepySyntax structure"
},
"Frontend Page": {
"prefix": "sleepy-page",
"body": [
"frontend:(",
"\t${1:pageName}:(",
"\t\tcolumn:[",
"\t\t\t$2",
"\t\t]",
"\t)",
")"
],
"description": "Frontend page definition"
},
"API Endpoint": {
"prefix": "sleepy-api",
"body": [
"${1|GET,POST,PUT,DELETE,PATCH|}:${2:/api/path}:(",
"\tbody:(${3:fields}),",
"\texec:(${4:logic}),",
"\treturns:(${5:response})",
")"
],
"description": "API endpoint definition"
},
"Database Table": {
"prefix": "sleepy-table",
"body": [
"${1:tableName}:(",
"\tid:uuid_primary,",
"\t${2:field}:${3|string_required,string_nullable,integer,boolean,timestamp_auto|},",
"\tcreated_at:timestamp_auto",
")"
],
"description": "Database table definition"
},
"UI Component": {
"prefix": "sleepy-component",
"body": [
"${1:component}${2:\\$variant}:${3|[elements],content,(reference)|}$0"
],
"description": "UI component with optional style variant"
},
"ForEach Loop": {
"prefix": "sleepy-foreach",
"body": [
"forEach:api.${1:items}:[",
"\t${2:template}",
"]"
],
"description": "ForEach loop for API data"
},
"Conditional": {
"prefix": "sleepy-if",
"body": [
"${1|if,unless|}:api.${2:condition}:[",
"\t${3:content}",
"]"
],
"description": "Conditional rendering"
}
}