Skip to content

Instantly share code, notes, and snippets.

@BANG88
Last active February 28, 2017 01:58
Show Gist options
  • Save BANG88/c7331d55550c7881727f7b59a204fdd1 to your computer and use it in GitHub Desktop.
Save BANG88/c7331d55550c7881727f7b59a204fdd1 to your computer and use it in GitHub Desktop.
Visual Studio Code Sync Settings GIST
{"lastUpload":"2017-02-28T01:57:31.456Z","extensionVersion":"v2.5.1"}
[
{
"metadata": {
"galleryApiUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"id": "2e9fe0cb-4e63-42fc-a809-fb056aad49c3",
"publisherId": "013ff321-59ed-41d2-b884-eba2818695f9",
"publisherDisplayName": "stevencl"
},
"name": "addDocComments",
"publisher": "stevencl",
"version": "0.0.8"
},
{
"metadata": {
"galleryApiUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"id": "835af090-485a-48fc-bc95-4dd5b3e79734",
"publisherId": "42c0760b-fc8c-46bc-975e-4de389991ae8",
"publisherDisplayName": "steve8708"
},
"name": "Align",
"publisher": "steve8708",
"version": "0.2.0"
},
{
"metadata": {
"id": "214cbfb9-7c06-4467-bad4-357ae83eb587",
"publisherId": "4434843a-4ebf-4f44-84f5-4176380c492d",
"publisherDisplayName": "johnpapa"
},
"name": "Angular2",
"publisher": "johnpapa",
"version": "2.0.3"
},
{
"metadata": {
"id": "ec17a0c8-7948-4ccb-b10e-7a4b5e2ab543",
"publisherId": "101e45d9-90d2-4431-a983-daa35b152dfa",
"publisherDisplayName": "bang"
},
"name": "antd-snippets",
"publisher": "bang",
"version": "0.0.3"
},
{
"metadata": {
"id": "697255a9-3f36-44c8-b084-d3b91edfb23a",
"publisherId": "901b401e-7657-4a33-8c9a-0854c569607e",
"publisherDisplayName": "HookyQR"
},
"name": "beautify",
"publisher": "HookyQR",
"version": "0.8.8"
},
{
"metadata": {
"id": "b689fcc8-d494-4dbf-a228-2c694a578afc",
"publisherId": "3fbdef65-bdf5-4723-aeaf-9e12a50546ef",
"publisherDisplayName": "Alessandro Fragnani"
},
"name": "Bookmarks",
"publisher": "alefragnani",
"version": "0.11.0"
},
{
"metadata": {
"id": "8a0c151b-eb13-4bed-9d49-4a252a118a0c",
"publisherId": "81220008-de86-48d4-9d4a-a5f250aaee57",
"publisherDisplayName": "michelemelluso"
},
"name": "code-beautifier",
"publisher": "michelemelluso",
"version": "1.6.2"
},
{
"metadata": {
"id": "a6a0c5b2-d078-4bf5-a9ee-4e37054414b3",
"publisherId": "38bbe3f0-5204-4170-845e-c2f966d979b8",
"publisherDisplayName": "Jun Han"
},
"name": "code-runner",
"publisher": "formulahendry",
"version": "0.6.12"
},
{
"metadata": {
"id": "e337c67b-55c2-4fef-8949-eb260e7fb7fd",
"publisherId": "ac3a3342-db76-40ef-9277-4657632d3bfe",
"publisherDisplayName": "Shan Khan"
},
"name": "code-settings-sync",
"publisher": "Shan",
"version": "2.5.1"
},
{
"metadata": {
"id": "690b692e-e8a9-493f-b802-8089d50ac1b2",
"publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee",
"publisherDisplayName": "Microsoft"
},
"name": "cpptools",
"publisher": "ms-vscode",
"version": "0.10.1"
},
{
"metadata": {
"id": "d0bfc4ab-1d3a-4487-8782-7cf6027b4fff",
"publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee",
"publisherDisplayName": "Microsoft"
},
"name": "csharp",
"publisher": "ms-vscode",
"version": "1.7.0"
},
{
"metadata": {
"id": "1ec62ca5-d7f9-4ddb-a882-e8d018c0aefd",
"publisherId": "ecde0778-6fe5-4f72-93a7-196989f19e58",
"publisherDisplayName": "Microsoft"
},
"name": "debugger-for-chrome",
"publisher": "msjsdiag",
"version": "2.5.4"
},
{
"metadata": {
"id": "cd2f03d4-8e29-48df-8456-28bb16433baf",
"publisherId": "098559cf-5faf-4777-be1e-5fe8debeb0d5",
"publisherDisplayName": "Ivan"
},
"name": "debugger-for-phantomjs",
"publisher": "iradul",
"version": "0.1.1"
},
{
"metadata": {
"id": "d1a2eab4-aa6e-4094-93b3-6a007f60bd9d",
"publisherId": "42d9583b-423d-428d-933b-b906585dbaa2",
"publisherDisplayName": "Keisuke Kato"
},
"name": "docomment",
"publisher": "k--kato",
"version": "0.0.14"
},
{
"metadata": {
"id": "90a838c3-675b-4b87-b7a5-75ea88432cce",
"publisherId": "d4fc689c-c760-4902-af94-114f64e1100f",
"publisherDisplayName": "Joel Day"
},
"name": "docthis",
"publisher": "joelday",
"version": "0.4.0"
},
{
"metadata": {
"id": "626735cf-2e54-4642-8bfc-02227eed9c52",
"publisherId": "8e4d6bbc-0366-441a-8877-6ba4fd16412c",
"publisherDisplayName": "mrcrowl"
},
"name": "easy-less",
"publisher": "mrcrowl",
"version": "1.3.4"
},
{
"metadata": {
"id": "f60a60a6-95ba-42d4-b41c-3d24c1b89588",
"publisherId": "1ed869e4-8588-4af4-a51e-9c1c86b034b9",
"publisherDisplayName": "EditorConfig"
},
"name": "EditorConfig",
"publisher": "EditorConfig",
"version": "0.3.4"
},
{
"metadata": {
"id": "2bba45f2-4a48-41a6-bb86-d6ba5ab29a9f",
"publisherId": "d2106b92-11a5-4945-97e5-0a0734c7a55c",
"publisherDisplayName": "Felipe Caputo"
},
"name": "git-project-manager",
"publisher": "felipecaputo",
"version": "1.0.1"
},
{
"metadata": {
"id": "2335b326-c334-4e81-bc51-c408fcec6e7c",
"publisherId": "531ba7ca-0230-4a97-bfd1-0d02fdb02958",
"publisherDisplayName": "Wade Anderson"
},
"name": "gitblame",
"publisher": "waderyan",
"version": "1.3.0"
},
{
"metadata": {
"id": "5960f38e-0bbe-4644-8f9c-9c8824e82511",
"publisherId": "1ba8bd00-2ad1-4be0-a007-5b4b954c1ee7",
"publisherDisplayName": "Don Jayamanne"
},
"name": "githistory",
"publisher": "donjayamanne",
"version": "0.1.5"
},
{
"metadata": {
"id": "4de763bd-505d-4978-9575-2b7696ecf94e",
"publisherId": "678d198b-9b2e-49d3-96ff-6d801c9575df",
"publisherDisplayName": "eamodio"
},
"name": "gitlens",
"publisher": "eamodio",
"version": "2.6.0"
},
{
"metadata": {
"id": "d6f6cfea-4b6f-41f4-b571-6ad2ab7918da",
"publisherId": "2bb7981d-dd9a-486d-8660-0cf1f838abf5",
"publisherDisplayName": "lukehoban"
},
"name": "Go",
"publisher": "lukehoban",
"version": "0.6.53"
},
{
"metadata": {
"id": "6c6d4703-0393-49e4-bcbe-2c01f5184522",
"publisherId": "249023ea-b388-4308-89f3-e5e6cfd85f9a",
"publisherDisplayName": "André Junges"
},
"name": "Handlebars",
"publisher": "andrejunges",
"version": "0.2.0"
},
{
"metadata": {
"id": "be992f3f-9f22-4b66-a1d2-ecad04c28a28",
"publisherId": "7fe357ee-5480-4a7d-a4e9-009d9438c2a3",
"publisherDisplayName": "Mohamed Abusaid"
},
"name": "html-snippets",
"publisher": "abusaidm",
"version": "0.1.0"
},
{
"metadata": {
"id": "0ec558c9-f7f7-4df3-b2cf-a41ddcf292dd",
"publisherId": "7377d5ef-f99a-4e55-9fca-af22665cf4bd",
"publisherDisplayName": "Mike Kaufman"
},
"name": "HTMLHint",
"publisher": "mkaufman",
"version": "0.3.3"
},
{
"metadata": {
"id": "250a9c40-e36a-41d2-b9f4-ab8520b9443c",
"publisherId": "101e45d9-90d2-4431-a983-daa35b152dfa",
"publisherDisplayName": "bang"
},
"name": "j2t",
"publisher": "bang",
"version": "0.0.2"
},
{
"metadata": {
"id": "5d6798de-490c-4b6a-92c8-cc98b6d92647",
"publisherId": "8961c3fe-3ec6-429d-886a-50b5af362a88",
"publisherDisplayName": "charalampos karypidis"
},
"name": "JasmineSnippets",
"publisher": "xabikos",
"version": "0.2.1"
},
{
"metadata": {
"id": "198a707e-28af-4e84-8610-6e2f628dd12d",
"publisherId": "eed56242-9699-4317-8bc7-e9f4b9bdd3ff",
"publisherDisplayName": "Red Hat"
},
"name": "java",
"publisher": "redhat",
"version": "0.0.10"
},
{
"metadata": {
"id": "a2cec723-5349-460d-9de9-0fd1f8d3456f",
"publisherId": "8961c3fe-3ec6-429d-886a-50b5af362a88",
"publisherDisplayName": "charalampos karypidis"
},
"name": "JavaScriptSnippets",
"publisher": "xabikos",
"version": "1.4.0"
},
{
"metadata": {
"id": "3bafbaa9-02d6-454c-ad91-5b7382597cb9",
"publisherId": "666d1c8a-62f9-4fc9-8abf-cbecba96fc74",
"publisherDisplayName": "Tomi Turtiainen"
},
"name": "js-complexity-analysis",
"publisher": "TomiTurtiainen",
"version": "1.0.4"
},
{
"metadata": {
"id": "d4d8d0a4-54f0-4f10-b8fb-b53f1575c53c",
"publisherId": "ef7d72a6-69ef-4842-97e8-d7e08c7d9027",
"publisherDisplayName": "keyring"
},
"name": "Lua",
"publisher": "keyring",
"version": "0.0.9"
},
{
"metadata": {
"id": "5db78037-f674-459f-a236-db622c427c5b",
"publisherId": "f9e5bc2f-fea1-4075-917f-d83e01e69f56",
"publisherDisplayName": "Philipp Kief"
},
"name": "material-icon-theme",
"publisher": "PKief",
"version": "1.3.4"
},
{
"metadata": {
"id": "26a529c9-2654-4b95-a63f-02f6a52429e6",
"publisherId": "8ae75bda-ec22-4a17-9340-abf1a20beca9",
"publisherDisplayName": "zhuangtongfa"
},
"name": "Material-theme",
"publisher": "zhuangtongfa",
"version": "1.0.3"
},
{
"metadata": {
"id": "4bf45e86-a448-4531-8c01-ef33f4536306",
"publisherId": "60b3df88-4640-44d4-a7e5-6ba8004700bb",
"publisherDisplayName": "Microsoft"
},
"name": "mssql",
"publisher": "ms-mssql",
"version": "0.2.1"
},
{
"metadata": {
"id": "dff6b801-247e-40e9-82e8-8c9b1d19d1b8",
"publisherId": "a892fb38-060b-475f-9e73-2e06a8a17a68",
"publisherDisplayName": "Christian Kohler"
},
"name": "npm-intellisense",
"publisher": "christian-kohler",
"version": "1.3.0"
},
{
"metadata": {
"id": "b027c4b2-25ad-46db-b574-05dae3b2dc92",
"publisherId": "25cdca6a-b422-4806-9041-a44a52d1a7d5",
"publisherDisplayName": "Joshua Azemoh"
},
"name": "one-monokai",
"publisher": "azemoh",
"version": "0.2.4"
},
{
"metadata": {
"id": "a41c1549-4053-44d4-bf30-60fc809b4a86",
"publisherId": "a892fb38-060b-475f-9e73-2e06a8a17a68",
"publisherDisplayName": "Christian Kohler"
},
"name": "path-intellisense",
"publisher": "christian-kohler",
"version": "1.2.0"
},
{
"metadata": {
"id": "40d39ce9-c381-47a0-80c8-a6661f731eab",
"publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee",
"publisherDisplayName": "Microsoft"
},
"name": "PowerShell",
"publisher": "ms-vscode",
"version": "0.9.0"
},
{
"metadata": {
"id": "96fa4707-6983-4489-b7c5-d5ffdfdcce90",
"publisherId": "d16f4e39-2ffb-44e3-9c0d-79d873570e3a",
"publisherDisplayName": "Esben Petersen"
},
"name": "prettier-vscode",
"publisher": "esbenp",
"version": "0.9.0"
},
{
"metadata": {
"id": "67e66172-30c7-4478-8f5d-6eac4ae755dc",
"publisherId": "114b20ca-e58f-4673-9024-1fe88a3e941a",
"publisherDisplayName": "Mohsen Azimi"
},
"name": "prettify-json",
"publisher": "mohsen1",
"version": "0.0.3"
},
{
"metadata": {
"id": "1b747f06-3789-4ebd-ac99-f1fe430c3347",
"publisherId": "3fbdef65-bdf5-4723-aeaf-9e12a50546ef",
"publisherDisplayName": "Alessandro Fragnani"
},
"name": "project-manager",
"publisher": "alefragnani",
"version": "0.13.2"
},
{
"metadata": {
"id": "f1f59ae4-9318-4f3c-a9b5-81b2eaa5f8a5",
"publisherId": "1ba8bd00-2ad1-4be0-a007-5b4b954c1ee7",
"publisherDisplayName": "Don Jayamanne"
},
"name": "python",
"publisher": "donjayamanne",
"version": "0.5.8"
},
{
"metadata": {
"galleryApiUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"id": "f15d6127-5ea1-42c9-b6ac-b10e914370cf",
"publisherId": "dff7c415-af47-4ba5-b8ab-db86d572f273",
"publisherDisplayName": "TsumiNa"
},
"name": "Seti-theme",
"publisher": "TsumiNa",
"version": "0.0.1"
},
{
"metadata": {
"id": "d6ba4b7b-539f-456a-b0f6-0348df44cdf3",
"publisherId": "1c8abab1-2180-4a6f-9552-2ee192489624",
"publisherDisplayName": "nikitaKunevich"
},
"name": "snippet-creator",
"publisher": "nikitaKunevich",
"version": "0.0.4"
},
{
"metadata": {
"id": "f8b5562e-a2d9-49ab-9f91-e7da91998a92",
"publisherId": "253db61f-997d-4722-8120-7559a25856e6",
"publisherDisplayName": "Shinnosuke Watanabe"
},
"name": "stylelint",
"publisher": "shinnn",
"version": "0.23.0"
},
{
"metadata": {
"galleryApiUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"id": "15de929b-c739-49db-86bc-b968cc6b7a5b",
"publisherId": "de925631-f87c-4d68-a8d8-4dde56bc19d2",
"publisherDisplayName": "Adam Caviness"
},
"name": "theme-monokai-dark-soda",
"publisher": "AdamCaviness",
"version": "0.0.5"
},
{
"metadata": {
"id": "cc1b9e15-8d4e-43ed-8a31-b81683af6bc4",
"publisherId": "25cdca6a-b422-4806-9041-a44a52d1a7d5",
"publisherDisplayName": "Joshua Azemoh"
},
"name": "theme-onedark",
"publisher": "azemoh",
"version": "0.4.3"
},
{
"metadata": {
"id": "513cf511-3894-4ee2-8c34-13ab83ddfd37",
"publisherId": "0b5821dc-b7ab-4fa0-bcee-c2add1d8f9db",
"publisherDisplayName": "egamma"
},
"name": "tslint",
"publisher": "eg2",
"version": "0.8.1"
},
{
"metadata": {
"id": "0479fc1c-3d67-49f9-b087-fb9069afe48f",
"publisherId": "bc3f1075-3ced-4395-9b1b-3f0ecaee83be",
"publisherDisplayName": "Microsoft"
},
"name": "vscode-docker",
"publisher": "PeterJausovec",
"version": "0.0.12"
},
{
"metadata": {
"id": "583b2b34-2c1e-4634-8c0b-0b82e283ea3a",
"publisherId": "29859a75-d81b-4f0e-8578-2c80ecee6f99",
"publisherDisplayName": "Dirk Baeumer"
},
"name": "vscode-eslint",
"publisher": "dbaeumer",
"version": "1.2.6"
},
{
"metadata": {
"id": "829a192d-496c-44ac-87f3-0a84ce36a853",
"publisherId": "c6e135ee-f6a2-45cb-b782-fd4de23acc84",
"publisherDisplayName": "Emmanuel Béziat"
},
"name": "vscode-great-icons",
"publisher": "emmanuelbeziat",
"version": "1.1.44"
},
{
"metadata": {
"id": "0c39b1dc-26df-4737-bb73-a98913b3ddad",
"publisherId": "704ac395-3cd6-43d3-976b-37b4fba43e2d",
"publisherDisplayName": "Jordan Lowe"
},
"name": "vscode-icon-theme",
"publisher": "jtlowe",
"version": "1.4.0"
},
{
"metadata": {
"id": "e0ee11e7-aa20-4e86-a3b9-2cd7d14fed93",
"publisherId": "8c148d69-cbc6-480b-bd8b-a42715926324",
"publisherDisplayName": "be5invis"
},
"name": "vscode-icontheme-nomo-dark",
"publisher": "be5invis",
"version": "1.2.5"
},
{
"metadata": {
"id": "b7495032-d1d3-4be2-a2a1-695559fcd3d6",
"publisherId": "261c2fe7-dbea-4dbf-bff3-6da4a886e8d2",
"publisherDisplayName": "David Bankier"
},
"name": "vscode-instant-markdown",
"publisher": "dbankier",
"version": "1.0.0"
},
{
"metadata": {
"id": "7997a8ae-1fae-4022-b834-12f6318aeffd",
"publisherId": "c22b4001-1af3-48d1-87ed-490c6c3b747f",
"publisherDisplayName": "Orta"
},
"name": "vscode-jest",
"publisher": "Orta",
"version": "2.0.5"
},
{
"metadata": {
"id": "3c6d2422-afcc-482d-a751-08c6ed38ce19",
"publisherId": "1765455a-0065-41ee-a148-b8fd4226221b",
"publisherDisplayName": "wmaurer"
},
"name": "vscode-jumpy",
"publisher": "wmaurer",
"version": "0.3.1"
},
{
"metadata": {
"id": "c856990a-978d-46eb-aa5e-318cd7bfecc6",
"publisherId": "248c914b-1e8e-48d3-989c-709e33d829e7",
"publisherDisplayName": "shanoor"
},
"name": "vscode-nginx",
"publisher": "shanoor",
"version": "0.3.1"
},
{
"metadata": {
"id": "ae9e3eb0-3357-4cc0-90ee-598d2d384757",
"publisherId": "0b5821dc-b7ab-4fa0-bcee-c2add1d8f9db",
"publisherDisplayName": "egamma"
},
"name": "vscode-npm-script",
"publisher": "eg2",
"version": "0.1.8"
},
{
"metadata": {
"id": "89134f28-b0f4-4aff-93fc-c77fb1ba2325",
"publisherId": "0eff48ba-abda-4eb0-b450-e4a1e8a35cc7",
"publisherDisplayName": "Dominik Kundel"
},
"name": "vscode-npm-source",
"publisher": "dkundel",
"version": "1.0.0"
},
{
"metadata": {
"id": "1d3d1fb2-0d8f-47ed-bfce-990b8ddfc9d8",
"publisherId": "01410813-d392-42ea-99c3-eb4475e23ac0",
"publisherDisplayName": "zxh404"
},
"name": "vscode-proto3",
"publisher": "zxh404",
"version": "0.1.0"
},
{
"metadata": {
"id": "b35cd5b4-18db-46f9-ba9e-06096c3b22d3",
"publisherId": "852b63c9-509c-44fb-a302-f04544c660ad",
"publisherDisplayName": "Visual Studio Mobile Tools"
},
"name": "vscode-react-native",
"publisher": "vsmobile",
"version": "0.3.1"
},
{
"metadata": {
"id": "bd52cbde-b7af-40be-bf56-67e57b6027da",
"publisherId": "92c9e5ec-8701-4679-ade5-8c7609963c83",
"publisherDisplayName": "Sam Chen"
},
"name": "vscode-standard-format",
"publisher": "chenxsan",
"version": "0.0.12"
},
{
"metadata": {
"id": "b9b38184-b873-4eae-b226-f332c40afd1a",
"publisherId": "c958976e-9702-4f1a-8bdf-26b7bc012d65",
"publisherDisplayName": "mrmlnc"
},
"name": "vscode-stylefmt",
"publisher": "mrmlnc",
"version": "2.2.2"
},
{
"metadata": {
"id": "6f5d4f30-67aa-4151-80c0-1bbe8ca5f9db",
"publisherId": "1dfd9e90-5113-4f41-bfad-a22f8288078e",
"publisherDisplayName": "cssho"
},
"name": "vscode-svgviewer",
"publisher": "cssho",
"version": "1.3.1"
},
{
"metadata": {
"id": "9b2c953d-6ad4-46d1-b18e-7e5992d1d8a6",
"publisherId": "1a680e61-b64e-4eff-bbbb-2085b0618f52",
"publisherDisplayName": "Mahmoud Ali"
},
"name": "vscode-theme-onedark",
"publisher": "akamud",
"version": "1.3.1"
},
{
"metadata": {
"id": "0cb81da2-1880-4755-9995-0ae9cc728e20",
"publisherId": "0a72d6f9-f644-4e7d-93fe-34389b97e913",
"publisherDisplayName": "Josh Johnson"
},
"name": "xml",
"publisher": "DotJoshJohnson",
"version": "1.7.0"
}
]
// Place your key bindings in this file to overwrite the defaults
[{
"key": "ctrl+alt+s",
"command": "extension.createSnippet",
"when": "editorTextFocus"
},{
"key": "f7",
"command": "workbench.action.git.sync"
}, {
"key": "ctrl+shift+c",
"command": "extension.addDocComments",
"when": "editorTextFocus"
}, {
"key": "ctrl+alt+v",
"command": "extension.convert.json.to.ts",
"when": "editorTextFocus"
},{
"key": "ctrl+h",
"command": "editor.emmet.action.wrapWithAbbreviation",
"when": "editorTextFocus"
}, {
"key": "ctrl+r ctrl+f",
"command": "go.test.file"
}, {
"key": "ctrl+alt+g",
"command": "go.test.generate.package"
}, {
"key": "ctrl+alt+f",
"command": "stylefmt.execute"
}, {
"key": "ctrl+alt+r",
"command": "workbench.action.reloadWindow"
}, {
"key": "f6",
"command": "workbench.action.debug.restart",
"when": "editorTextFocus"
}]
// Place your settings in this file to overwrite the default settings
{
"tslint.enable": false,
"eslint.enable": false,
"explorer.openEditors.visible": 0,
"editor.renderIndentGuides": true,
"terminal.external.windowsExec": "C:\\Users\\bang\\AppData\\Local\\hyper\\app-1.1.0\\Hyper.exe",
"npm.runInTerminal": false,
"html.format.endWithNewline": true,
"window.openFilesInNewWindow": false,
"diffEditor.renderSideBySide": true,
"typescript.check.tscVersion": false,
"npm-intellisense.scanDevDependencies": true,
"git.confirmSync": false,
"window.zoomLevel": 0,
"tslint.autoFixOnSave": false,
"code-runner.customCommand": "cd $dir && go test -v $fileNameWithoutExt_test.go $fileName",
"workbench.statusBar.visible": true,
"window.fullScreenZenMode": false,
"editor.lineHeight": 24,
"editor.fontSize": 15,
"sync.gist": "c7331d55550c7881727f7b59a204fdd1",
"sync.lastUpload": "2017-01-13T10:22:58.075Z",
"sync.autoDownload": false,
"sync.autoUpload": false,
"sync.lastDownload": "1970-01-01T00:00:00.000Z",
"sync.version": 251,
"sync.showSummary": true,
"sync.forceDownload": false,
"sync.workspaceSync": false,
"sync.anonymousGist": false,
"typescript.referencesCodeLens.enabled": true
}
{
"Default Button": {
"prefix": "antb",
"body": [
"<Button>$1</Button>",
""
]
},
"Primary Button": {
"prefix": "antbp",
"body": [
"<Button type=\"primary\">$1</Button>",
""
]
},
"Dashed Button": {
"prefix": "antbd",
"body": [
"<Button type=\"dashed\">$1</Button>",
""
]
},
"Danger Button": {
"prefix": "antbdanger",
"body": [
"<Button type=\"danger\">$1</Button>",
""
]
},
"Icon Button": {
"prefix": "antbicon",
"body": [
"<Button icon=\"$1\">$1</Button>",
""
]
},
"Radio Group Button": {
"prefix": "antbradiogroup",
"body": [
"<Radio.Group value=\"$1\" >\r",
" <Radio.Button value=\"$1\">$1</Radio.Button>\r",
" <Radio.Button value=\"$2\">$2</Radio.Button>\r",
" <Radio.Button value=\"$3\">$3</Radio.Button>\r",
"</Radio.Group>",
""
]
},
"Basic Button Group": {
"prefix": "antbgroup",
"body": [
"<ButtonGroup>\r",
" <Button>$1</Button>\r",
" <Button type=\"primary\">$2</Button>\r",
"</ButtonGroup>\r",
""
],
"description": ""
},
"Icon": {
"prefix": "anticon",
"body": [
"<Icon type=\"$1\" />"
],
"description": ""
},
"Row": {
"prefix": "antrow",
"body": [
"<Row gutter={16}>\r",
" <Col span={6} />\r",
" <Col span={6} />\r",
" <Col span={6} />\r",
" <Col span={6} />\r",
"</Row>\r",
""
],
"description": "The Basic Grid Row."
},
"Layout": {
"prefix": "antlayout",
"body": [
"<Layout>\r",
" <Header>header</Header>\r",
" <Layout>\r",
" <Sider>left sidebar</Sider>\r",
" <Content>main content</Content>\r",
" <Sider>right sidebar</Sider>\r",
" </Layout>\r",
" <Footer>footer</Footer>\r",
"</Layout>"
],
"description": "The Basic Layout"
},
"Affix": {
"prefix": "antaffix",
"body": [
"<Affix>\r",
" <Button type=\"primary\">$1</Button>\r",
"</Affix>\r",
""
],
"description": "Affix"
},
"Breadcrumb": {
"prefix": "antbread",
"body": [
"<Breadcrumb>\r",
" <Breadcrumb.Item>Home</Breadcrumb.Item>\r",
" <Breadcrumb.Item><a href=\"\">Application Center</a></Breadcrumb.Item>\r",
" <Breadcrumb.Item><a href=\"\">Application List</a></Breadcrumb.Item>\r",
" <Breadcrumb.Item>An Application</Breadcrumb.Item>\r",
"</Breadcrumb>\r",
""
],
"description": ""
},
"Dropdown": {
"prefix": "antdropdown",
"body": [
"const menu = <Menu>\r",
" <Menu.Item>\r",
" <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"#\">1st menu item</a>\r",
" </Menu.Item>\r",
" <Menu.Item>\r",
" <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"#\">2nd menu item</a>\r",
" </Menu.Item>\r",
" <Menu.Item>\r",
" <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"#\">3d menu item</a>\r",
" </Menu.Item>\r",
"</Menu>\r",
"\r",
"<Dropdown overlay={menu}>\r",
" <a className=\"ant-dropdown-link\" href=\"#\">\r",
" Hover me <Icon type=\"down\" />\r",
" </a>\r",
"</Dropdown>",
""
],
"description": "The Basic Dropdown."
},
"Menu": {
"prefix": "antmenu",
"body": [
"<Menu>\r",
" <Menu.Item>Menu</Menu.Item>\r",
" <SubMenu title=\"SubMenu\">\r",
" <Menu.Item>SubMenuItem</Menu.Item>\r",
" </SubMenu>\r",
"</Menu>\r",
""
],
"description": ""
},
"Steps": {
"prefix": "antsteps",
"body": [
"<Steps current={1}>\r",
" <Steps.Step title=\"Finished\" description=\"This is a description.\" />\r",
" <Steps.Step title=\"In Progress\" description=\"This is a description.\" />\r",
" <Steps.Step title=\"Waiting\" description=\"This is a description.\" />\r",
"</Steps>\r",
""
],
"description": ""
},
"Tabs": {
"prefix": "anttabs",
"body": [
"<Tabs defaultActiveKey=\"1\">\r",
" <Tabs.TabPane tab=\"Tab 1\" key=\"1\">Content of Tab Pane 1</Tabs.TabPane>\r",
" <Tabs.TabPane tab=\"Tab 2\" key=\"2\">Content of Tab Pane 2</Tabs.TabPane>\r",
" <Tabs.TabPane tab=\"Tab 3\" key=\"3\">Content of Tab Pane 3</Tabs.TabPane>\r",
"</Tabs>\r",
""
],
"description": ""
},
"Checkbox": {
"prefix": "antcheckbox",
"body": [
"<Checkbox>$1</Checkbox>",
""
],
"description": "The Basic Checkbox"
},
"Checkbox Group": {
"prefix": "antcheckboxgroup",
"body": [
"const optionsWithDisabled = [\r",
" { label: 'Apple', value: 'Apple' },\r",
" { label: 'Pear', value: 'Pear' },\r",
" { label: 'Orange', value: 'Orange', disabled: false },\r",
"]\r",
"\r",
"<CheckboxGroup options={optionsWithDisabled} disabled defaultValue={['Apple']}/>\r",
""
],
"description": "Generate a group of checkboxes from an array."
},
"Horizontal Form": {
"prefix": "antformhorizontal",
"body": [
"<Form horizontal>\r",
" <FormItem label=\"Field A\" labelCol={{ span: 4 }} wrapperCol={{ span: 14 }}>\r",
" <Input placeholder=\"input placeholder\" />\r",
" </FormItem>\r",
" <FormItem label=\"Field B\" labelCol={{ span: 4 }} wrapperCol={{ span: 14 }}>\r",
" <Input placeholder=\"input placeholder\" />\r",
" </FormItem>\r",
" <FormItem wrapperCol={{ span: 14, offset: 4 }}>\r",
" <Button type=\"primary\" size=\"large\">Submit</Button>\r",
" </FormItem>\r",
"</Form>\r",
""
],
"description": ""
},
"Form": {
"prefix": "antform",
"body": [
"<Form>\r",
" <FormItem label=\"Field A\">\r",
" <Input placeholder=\"input placeholder\" />\r",
" </FormItem>\r",
" <FormItem label=\"Field B\">\r",
" <Input placeholder=\"input placeholder\" />\r",
" </FormItem>\r",
" <FormItem>\r",
" <Button type=\"primary\" size=\"large\">Submit</Button>\r",
" </FormItem>\r",
"</Form>\r",
""
],
"description": "Create a vertical Form"
},
"Inline Form": {
"prefix": "antforminline",
"body": [
"<Form inline>\r",
" <FormItem label=\"Field A\">\r",
" <Input placeholder=\"input placeholder\" />\r",
" </FormItem>\r",
" <FormItem label=\"Field B\">\r",
" <Input placeholder=\"input placeholder\" />\r",
" </FormItem>\r",
" <FormItem>\r",
" <Button type=\"primary\" size=\"large\">Submit</Button>\r",
" </FormItem>\r",
"</Form>\r",
""
],
"description": "Create an inline Form"
},
"Input": {
"prefix": "antinput",
"body": [
"<Input placeholder=\"Basic usage\" />\r",
""
],
"description": "Basic Input"
},
"Input With addon": {
"prefix": "antinputaddon",
"body": [
"<Input addonAfter={<Icon type=\"$1\" />} defaultValue=\"$2\" />\r",
""
],
"description": ""
},
"Input Group": {
"prefix": "antinputgroup",
"body": [
"<InputGroup size=\"large\">\r",
" <Col span=\"4\">\r",
" <Input defaultValue=\"$1\" />\r",
" </Col>\r",
" <Col span=\"8\">\r",
" <Input defaultValue=\"$2\" />\r",
" </Col>\r",
"</InputGroup>\r",
""
],
"description": ""
},
"Input Group Compact": {
"prefix": "antinputgroupcompact",
"body": [
"<InputGroup compact>\r",
" <Input style={{ width: '20%' }} defaultValue=\"$1\" />\r",
" <Input style={{ width: '30%' }} defaultValue=\"$2\" />\r",
"</InputGroup>\r",
""
],
"description": "Create an Input Gourp with compact mode"
},
"Input Group With Select": {
"prefix": "antinputselect",
"body": [
"<InputGroup compact>\r",
" <Select defaultValue=\"$1\">\r",
" <Option value=\"$1\">$1</Option>\r",
" <Option value=\"$2\">$2</Option>\r",
" </Select>\r",
" <Input style={{ width: '50%' }} defaultValue=\"$3\" />\r",
"</InputGroup>\r",
""
],
"description": "Create an Input Group with Select "
},
"Radio": {
"prefix": "antradio",
"body": [
"<Radio>$1</Radio>"
],
"description": ""
},
"Radio Group": {
"prefix": "antradiogroup",
"body": [
"<RadioGroup>\r",
" <Radio value={1}>A</Radio>\r",
" <Radio value={2}>B</Radio>\r",
" <Radio value={3}>C</Radio>\r",
" <Radio value={4}>D</Radio>\r",
"</RadioGroup>\r",
""
],
"description": ""
},
"Radio Button Group": {
"prefix": "antradiobuttongroup",
"body": [
"<RadioGroup>\r",
" <RadioButton value=\"a\">$1</RadioButton>\r",
" <RadioButton value=\"b\" disabled>$2</RadioButton>\r",
" <RadioButton value=\"c\">$3</RadioButton>\r",
" <RadioButton value=\"d\">$4</RadioButton>\r",
"</RadioGroup>\r",
""
],
"description": ""
},
"Select": {
"prefix": "antselect",
"body": [
"<Select defaultValue=\"$1\" style={{ width: 120 }}>\r",
" <Option value=\"$1\">$1</Option>\r",
" <Option value=\"$2\">$2</Option>\r",
" <Option value=\"$3\" disabled>$4</Option>\r",
" <Option value=\"$4\">$4</Option>\r",
"</Select>\r",
""
],
"description": ""
},
"Badge": {
"prefix": "antbadge",
"body": [
"<Badge count={$1}>\r",
" <a href=\"#\"/>\r",
"</Badge>\r",
""
],
"description": ""
},
"Card with extra": {
"prefix": "antcard",
"body": [
"<Card title=\"$1\" extra={<a href=\"#\">More</a>}>\r",
" <p>$2</p>\r",
"</Card>\r",
""
],
"description": ""
},
"Collapse": {
"prefix": "antcollapse",
"body": [
"<Collapse defaultActiveKey={[ '1']}>\r",
" <Panel header=\"This is panel header 1\" key=\"1\">\r",
" <p>{text}</p>\r",
" </Panel>\r",
" <Panel header=\"This is panel header 2\" key=\"2\">\r",
" <p>{text}</p>\r",
" </Panel>\r",
" <Panel header=\"This is panel header 3\" key=\"3\">\r",
" <p>{text}</p>\r",
" </Panel>\r",
"</Collapse>\r",
""
],
"description": ""
},
"Popover": {
"prefix": "antpopover",
"body": [
"<Popover content={ <div>\r",
" <p>$3</p>\r",
" </div>\r",
" } title=\"$2\" >\r",
" <Button type=\"primary\">$1</Button>\r",
"</Popover>\r",
""
],
"description": ""
},
"Tooltip": {
"prefix": "anttooltip",
"body": [
"<Tooltip title=\"$1\">\r",
" <span>$2</span>\r",
"</Tooltip>\r",
""
],
"description": ""
},
"Table": {
"prefix": "anttable",
"body": [
"<Table dataSource={$1}>\r",
" <ColumnGroup title=\"Name\">\r",
" <Column title=\"First Name\" dataIndex=\"firstName\" key=\"firstName\" />\r",
" <Column title=\"Last Name\" dataIndex=\"lastName\" key=\"lastName\" />\r",
" </ColumnGroup>\r",
" <Column title=\"Age\" dataIndex=\"age\" key=\"age\" />\r",
" <Column title=\"Address\" dataIndex=\"address\" key=\"address\" />\r",
" <Column title=\"Action\" key=\"action\" render={(text, record)=> (\r",
" <span>\r",
" <a href=\"#\">Action 一 {record.name}</a>\r",
" <span className=\"ant-divider\" />\r",
" <a href=\"#\">Delete</a>\r",
" <span className=\"ant-divider\" />\r",
" <a href=\"#\" className=\"ant-dropdown-link\">\r",
" More actions <Icon type=\"down\" />\r",
" </a>\r",
" </span> )} />\r",
"</Table>\r",
""
],
"description": "Basic JSX Style Table. "
},
"Timeline": {
"prefix": "anttimeline",
"body": [
"<Timeline>\r",
" <Timeline.Item>Create a services site 2015-09-01</Timeline.Item>\r",
" <Timeline.Item>Solve initial network problems 2015-09-01</Timeline.Item>\r",
" <Timeline.Item>Technical testing 2015-09-01</Timeline.Item>\r",
" <Timeline.Item>Network problems being solved 2015-09-01</Timeline.Item>\r",
"</Timeline>\r",
""
],
"description": ""
},
"Alert": {
"prefix": "antalert",
"body": [
"<Alert message=\"Success Text\" type=\"success\" />\r",
""
],
"description": ""
},
"Alert Closable": {
"prefix": "antalertx",
"body": [
"<Alert message=\"$1\"\r",
" description=\"$2\"\r",
" type=\"error\"\r",
" closable\r",
"/>"
],
"description": ""
},
"Modal": {
"prefix": "antmodal",
"body": [
"<Modal title=\"$1\" visible>\r",
" <p>$2</p>\r",
"</Modal>\r",
""
],
"description": ""
},
"Information Modal": {
"prefix": "antmodalinfo",
"body": [
"Modal.$1({\r",
" title: '$2',\r",
" content: '$3',\r",
"})",
""
],
"description": ""
},
"Message": {
"prefix": "antmsg",
"body": [
"message.info('$1')",
""
],
"description": ""
},
"Notification": {
"prefix": "antnotification",
"body": [
"notification.$1({\r",
" message: '$2',\r",
" description: '$3',\r",
"})",
""
],
"description": ""
},
"Popconfirm": {
"prefix": "antpopconfirm",
"body": [
"<Popconfirm title=\"Are you sure delete this task?\">\r",
" <a href=\"#\">$1</a>\r",
"</Popconfirm>",
""
],
"description": ""
}
}
{
/*
// Place your snippets for Java here. Each snippet is defined under a snippet name and has a prefix, body and
// description. 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, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
}
{
/*
// Place your snippets for JavaScript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. 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, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
"react测试": {
"prefix": "ta",
"body": [
"import test from 'ava'",
"import React from 'react'",
"import { shallow } from 'enzyme'",
"import $1 from '../src/$1'",
"test('$2', t => {",
" $3",
"})"
]
},
"失败": {
"prefix": "tf",
"body": [
"test('$1', t => {",
" t.fail()$2",
"})",
""
]
},
"测试click事件": {
"prefix": "tc",
"body": [
"test('$1 click', t => {",
" t.fail()$2",
"})",
""
]
},
"测试shallow": {
"prefix": "ts",
"body": [
"const w = shallow(<$1/>)",
"$2"
]
}
}
{
"Import Formatted Message": {
"prefix": "imfm",
"body": [
"import { FormattedMessage } from 'react-intl'",
"$1"
]
},
"Formatted Message": {
"prefix": "fm",
"body": [
"<FormattedMessage",
"id=\"app.$1\"",
"defaultMessage=\"$2\" />$3"
]
},
"Actions Creator": {
"prefix": "ac",
"body": [
"export const $1PENDING = 'app/$1/PENDING'",
"export const $1FULFILLED = 'app/$1/FULFILLED'",
"export const $1REJECTED = 'app/$1/REJECTED'",
"$4",
"export const $2 = () => {",
" return {",
" types: [$1PENDING, $1FULFILLED, $1REJECTED],",
" /**",
" * @param {Client} client",
" */",
" promise: client => client.get('/$3'),",
" }",
"}"
]
},
"Default Reducer Creator": {
"prefix": "drc",
"body": [
"const initialState = new Map({})",
"export default (state = initialState, action) => {",
" switch (action.type) {",
" case $1:",
" return state.set($2);",
" default:",
" return state",
" }",
"}"
]
},
"auto bind": {
"prefix": "ab",
"body": "this.$1 = this.$1.bind(this)$2"
},
"import translation messages": {
"prefix": "itm",
"body": "import messages from '../../translations'$1"
}
}
{
/*
// Place your snippets for JSON here. Each snippet is defined under a snippet name and has a prefix, body and
// description. 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, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
}
{
/*
// Place your snippets for Markdown here. Each snippet is defined under a snippet name and has a prefix, body and
// description. 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, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
"code": {
"prefix": "sh",
"body": [
"```sh",
"$1",
"```"
]
}
}
{
"tsroute": {
"prefix": "tsroute",
"body": [
"import * as React from 'react';\r",
"import './App.css';\r",
"\r",
"const logo = require('./logo.svg');\r",
"import { Button, } from 'antd';\r",
"\r",
"import { Link } from 'react-router'\r",
"\r",
"declare interface AppProps {\r",
" children?: React.ReactNode\r",
"}\r",
"declare interface AppState { }\r",
"class App extends React.Component<AppProps, AppState> {\r",
" render() {\r",
" return (\r",
" <div className=\"App\">\r",
" <div className=\"App-header\">\r",
" <img src={logo} className=\"App-logo\" alt=\"logo\" />\r",
" <Link to=\"/\">\r",
" <h2>后台系统</h2>\r",
" </Link>\r",
" </div>\r",
"\r",
" {\r",
" this.props.children || <div>\r",
" <p className=\"App-intro\">To get started, edit <code>src/App.tsx</code> and save to reload.</p>\r",
" <Link to=\"/welcome\">\r",
" <Button type=\"primary\">Go to welcome page</Button>\r",
" </Link>\r",
" </div>\r",
" }\r",
" </div>\r",
" );\r",
" }\r",
"}\r",
"\r",
"export default App;\r",
""
],
"description": "typescript route component"
}
}
{
/*
// Place your snippets for Razor here. Each snippet is defined under a snippet name and has a prefix, body and
// description. 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": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
}
{
/*
// Place your snippets for Sass here. Each snippet is defined under a snippet name and has a prefix, body and
// description. 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, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
"btn-icon": {
"prefix": "ii",
"body": [
".icon-btn-$1 {",
" @include backgroundImage('$1', $2px, $3px);",
"}",
"$4"
]
}
}
{
/*
// Place your snippets for TypeScript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. 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, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
"ant": {
"prefix": "a",
"body": [
"interface $1Props extends React.Props<$1> {",
" $2",
"}",
"export class $1 extends React.Component<$1Props, {}>{ }",
" ",
" ",
" "
]
},
"add comments": {
"prefix": "c",
"body": "/** $1*/"
}
}
{
"typescriptrouter": {
"prefix": "tspage",
"body": [
"import * as React from 'react';\r",
"import './App.css';\r",
"\r",
"const logo = require('./logo.svg');\r",
"import { Button, } from 'antd';\r",
"\r",
"import { Link } from 'react-router'\r",
"\r",
"declare interface AppProps {\r",
" children?: React.ReactNode\r",
"}\r",
"declare interface AppState { }\r",
"class App extends React.Component<AppProps, AppState> {\r",
" render() {\r",
" return (\r",
" <div className=\"App\">\r",
" <div className=\"App-header\">\r",
" <img src={logo} className=\"App-logo\" alt=\"logo\" />\r",
" <Link to=\"/\">\r",
" <h2>后台系统</h2>\r",
" </Link>\r",
" </div>\r",
"\r",
" {\r",
" this.props.children || <div>\r",
" <p className=\"App-intro\">To get started, edit <code>src/App.tsx</code> and save to reload.</p>\r",
" <Link to=\"/welcome\">\r",
" <Button type=\"primary\">Go to welcome page</Button>\r",
" </Link>\r",
" </div>\r",
" }\r",
" </div>\r",
" );\r",
" }\r",
"}\r",
"\r",
"export default App;\r",
""
],
"description": "ts"
},
"component": {
"prefix": "tscom",
"body": [
"import * as React from 'react'\r",
"\r",
"declare interface $1Props {\r",
" children?: React.ReactNode\r",
"}\r",
"declare interface $1State { }\r",
"class $1 extends React.Component<$1Props, $1State> {\r",
" render() {\r",
" return (\r",
" <div className=\"$1\">\r",
" Component\r",
" </div>\r",
" )\r",
" }\r",
"}\r",
"\r",
"export default $1\r",
""
],
"description": ""
},
"tsroute": {
"prefix": "tsroute",
"body": [
"import { RouteConfig } from 'react-router'\r",
"\r",
"export default (store: Store): RouteConfig => ({\r",
" path: '$1',\r",
" name: '$1',\r",
" breadcrumbName: '$1',\r",
" getComponent(nextState, cb) {\r",
" require.ensure([], (require) => {\r",
" // inject reducer\r",
" const reducer = require('./service').default\r",
" store.injectReducer({\r",
" key: '$1',\r",
" reducer,\r",
" })\r",
" // load component\r",
" const $2 = require('./$2').default\r",
" // Return component\r",
" cb(null, $2)\r",
" })\r",
" },\r",
" getChildRoutes(location, cb) {\r",
" require.ensure([], (require) => {\r",
" cb(null, [\r",
" // require('./Detail').default(store)\r",
" ])\r",
" })\r",
" },\r",
"})"
],
"description": ""
},
"tsm": {
"prefix": "tsm",
"body": [
"import { handle } from 'redux-pack'\r",
"import { Map } from 'immutable'\r",
"import http from '../../utils/http'\r",
"\r",
"export const $1 = '$1'\r",
"/**\r",
" * $2\r",
" * @returns ReduxPackAction\r",
" */\r",
"export const $3 = (): ReduxPackAction => {\r",
" return {\r",
" type: $1,\r",
" promise: http.get('/$2')\r",
" }\r",
"}\r",
"/**\r",
" * initial state \r",
" * @param {[]}} \r",
" */\r",
"export const initialState = Map({\r",
" $2: []\r",
"})\r",
"/**\r",
" * pure reducer\r",
" * @param {} state=initialState\r",
" * @param {} action\r",
" */\r",
"export default (state = initialState, action: ReduxPackFinalAction) => {\r",
"\r",
" const { type, payload } = action\r",
" switch (type) {\r",
" case $1:\r",
" return handle(state, action, {\r",
" success: s => state.set('$2', payload.data)\r",
" })\r",
" default:\r",
" return state\r",
" }\r",
"}"
],
"description": "service"
},
"tsaction": {
"prefix": "tsaction",
"body": [
"export const $1 = '$1'\r",
"/**\r",
" * $5\r",
" * @returns ReduxPackAction\r",
" */\r",
"export const $2 = ($3): ReduxPackAction => {\r",
" return {\r",
" type: $1,\r",
" promise: Promise.resolve({\r",
" data: $4\r",
" })\r",
" }\r",
"}"
],
"description": "create a redux action"
},
"tsconncet": {
"prefix": "tsredux",
"body": [
"import * as React from 'react'\r",
"import { Link } from 'react-router'\r",
"import { connect } from 'react-redux'\r",
"import { Table, } from 'antd'\r",
"import { loadPosts } from './service'\r",
"import Page from '../../components/Page'\r",
"\r",
"interface Post {\r",
" title: string\r",
" body: string\r",
" id: number\r",
" key: string\r",
"}\r",
"interface PostProps<T> {\r",
" posts: T[]\r",
" loadPosts: Function\r",
"};\r",
"\r",
"interface PostState { };\r",
"/**\r",
" * try to use generic Table Component \r",
" */\r",
"const MyTable = Table as new (props: PostProps<Post>) => Table<Post>\r",
"import { TableColumnConfig } from 'antd/lib/table/Table'\r",
"\r",
"class Post extends React.Component<PostProps<Post>, PostState> {\r",
" componentDidMount() {\r",
" this.props.loadPosts()\r",
" }\r",
"\r",
" render() {\r",
" const posts = this.props.posts.map(p => {\r",
" // Table need a unique key\r",
" p.key = p.id.toString()\r",
" return p\r",
" })\r",
" const columns: TableColumnConfig<Post>[] = [\r",
" {\r",
" title: 'No.',\r",
" dataIndex: 'id',\r",
" width: 100,\r",
" render(id) {\r",
" return <Link to={`/posts/${id}`}>#{id}</Link>\r",
" }\r",
" },\r",
" {\r",
" title: 'Title',\r",
" dataIndex: 'title',\r",
" render(title, item) {\r",
" return <span>{item.title}</span>\r",
" }\r",
" },\r",
" {\r",
" title: 'Body',\r",
" dataIndex: 'body'\r",
" },\r",
" ]\r",
" return <Page>\r",
" <Page.Header title=\"POSTS - 2122\" style={{background: '#FF5722', color: '#fff', padding: 24}}>\r",
" <h3>Demo Demo Demo .....</h3>\r",
" </Page.Header>\r",
" <Page.Content>\r",
" <MyTable dataSource={posts} columns={columns} bordered loading={!posts.length} />\r",
" </Page.Content>\r",
" </Page>\r",
" }\r",
"}\r",
"const mapStateToProps = (state) => {\r",
" const { posts } = state.get('posts').toJS()\r",
" return {\r",
" posts\r",
" }\r",
"}\r",
"function mapDispatchToProps(dispatch) {\r",
" return {\r",
" loadPosts: data => dispatch(loadPosts()),\r",
" dispatch,\r",
" }\r",
"}\r",
"export default connect<any, any, any>(mapStateToProps, mapDispatchToProps)(Post)"
],
"description": "add conncet support"
},
"Button": {
"prefix": "antb",
"body": [
"<Button type=\"primary\">Primary</Button>"
]
},
"default button": {
"prefix": "antb",
"body": [
"<Button type=\"primary\">Primary</Button>"
],
"description": "default button"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment