浏览代码

Update .gitignore to include the vscode snippets

tags/v0.1.2
Fen Dweller 6 年前
父节点
当前提交
78846d4ce3
找不到此签名对应的密钥 GPG 密钥 ID: E80B35A6F11C3656
共有 2 个文件被更改,包括 175 次插入1 次删除
  1. +18
    -1
      .gitignore
  2. +157
    -0
      .vscode/templates.code-snippets

+ 18
- 1
.gitignore 查看文件

@@ -1,2 +1,19 @@

# Created by https://www.gitignore.io/api/visualstudiocode
# Edit at https://www.gitignore.io/?templates=visualstudiocode

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

### VisualStudioCode Patch ###
# Ignore all local history of files
.history

# End of https://www.gitignore.io/api/visualstudiocode

!.vscode/templates.code-snippets
media/
.vscode

+ 157
- 0
.vscode/templates.code-snippets 查看文件

@@ -0,0 +1,157 @@
{
// Place your satiate workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Room": {
"prefix": "room",
"body": [
"\"$1\": {",
" \"id\": \"$1\",",
" \"name\": \"$2\",",
" \"desc\": \"$3\",",
" \"move\": (room, state) => {",
"",
" },",
" \"enter\": (room, state) => {",
"",
" },",
" \"exit\": (room, state) => {",
"",
" },",
" \"actions\": [",
"",
" ],",
" \"exits\": {",
"",
" },",
" \"hooks\": [",
"",
" ],",
" \"data\": {",
" \"stats\": {",
" ",
" }",
" }",
"},"
],
"description": "Room"
},
"Action": {
"prefix": "action",
"body": [
"{",
" name: \"$1\",",
" desc: \"$2\",",
" execute: (room, state) => {",
"",
" },",
" show: [",
"",
" ],",
" conditions: [",
"",
" ]",
"},"
],
"description": "Action"
},
"Exit": {
"prefix": "exit",
"body": [
"\"$1\": {",
" \"target\": \"$2\",",
" \"desc\": \"$3\",",
" \"show\": [",
" ",
" ],",
" \"conditions\": [",
"",
" ],",
" \"hooks\" [",
" ",
" ]",
"},"
],
"description": "Exit"
},
"Condition": {
"prefix": "cond",
"body": [
"(room, state) => {",
" return ${1:true}",
"}",
""
],
"description": "Condition"
},
"Stat": {
"prefix": "stat",
"body": [
"{\"name\": \"$1\", \"type\": \"${2|foo,bar|}\", \"value\": $3, \"max\": $4, \"color\": \"rgb(0,0,0)\" }"
],
"description": "Stat"
},
"Timer": {
"prefix": "timer",
"body": [
"startTimer({",
" id: \"$1\",",
" func: state => {",
" return true;",
" },",
" delay: $2,",
" loop: $3,",
" classes: [",
"",
" ]",
"}, state);",
""
],
"description": "Timer"
},
"Story": {
"prefix": "story",
"body": [
"stories.push({",
" \"id\": \"$1\",",
" \"name\": \"$2\",",
" \"tags\": [",
"",
" ],",
" \"intro\": {",
" \"start\": \"$3\",",
" \"setup\": state => {",
"",
" },",
" \"intro\": state => {",
"",
" }",
" },",
" \"sounds\": [",
"",
" ],",
" \"preload\": [",
"",
" ],",
" \"world\": {",
" s",
" }",
"});",
""
],
"description": "Story"
}
}

正在加载...
取消
保存