Let your editor cheer you on while you code!
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: add clarifying comments

+4 -6
+1 -4
extension.js
··· 1 - // The module 'vscode' contains the VS Code extensibility API 2 - // Import the module and reference it with the alias vscode in your code below 3 1 const vscode = require('vscode') 4 2 const { getMessage } = require('./messages') 5 3 6 - // this method is called when your extension is activated 7 - // your extension is activated the very first time the command is executed 8 4 function activate() { 5 + // Pull the extension configuration 9 6 const { emoji } = vscode.workspace.getConfiguration('cheer') 10 7 console.log('"vscode-cheer" standing by!') 11 8
+3 -2
messages.js
··· 1 1 const getRandomFromArray = require('get-random-from-array') 2 2 3 + // Messages pool 3 4 const messages = [ 4 5 'Great work!', 5 6 'Keep it up!', ··· 16 17 "I'm a huge fan of what you're doing!" 17 18 ] 18 19 19 - console.log('Moral support messages loaded!') 20 - 20 + // Create a random message closure 21 21 const getRandomMessage = getRandomFromArray(messages) 22 22 23 + // Return a random message w/ or w/o an emoji 23 24 const getMessage = emoji => { 24 25 return `${emoji ? '🎉 ' : ''}${getRandomMessage()}` 25 26 }