Last active
April 4, 2018 01:06
-
-
Save justin-endler/6920b3f0a3f027018188035a9068bbf4 to your computer and use it in GitHub Desktop.
VS Code JavaScript User Snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Test flag": { | |
"prefix": "test", | |
"body": [ | |
"// @test" | |
], | |
"description": "Flag line as testing only" | |
}, | |
"Todo flag": { | |
"prefix": "todo", | |
"body": [ | |
"// @todo" | |
], | |
"description": "Flag line as todo" | |
}, | |
"Debugger statement": { | |
"prefix": "db", | |
"body": [ | |
"debugger; // @test" | |
], | |
"description": "Insert a flagged debugger statement" | |
}, | |
"Console message": { | |
"prefix": "msg", | |
"body": [ | |
"console.log(\"${1:thing}\"); // @test" | |
], | |
"description": "Log a simple static message" | |
}, | |
"Console info": { | |
"prefix": "info", | |
"body": [ | |
"console.info(\"${1:thing}\", ${1:thing}); // @test" | |
], | |
"description": "Log some data with a label" | |
}, | |
"Write to file": { | |
"prefix": "write", | |
"body": [ | |
"(function(n,c){require('fs').writeFile('/some/path/'+n+'.html',c);})('${1:c}',${1}); // @test" | |
], | |
"description": "Write some content to file." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment