Skip to content
/ dashyjs Public

JavaScript/Visual Studio Code Setup for Dashy <3

Notifications You must be signed in to change notification settings

aoyshi/dashyjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

💜 dashyjs 💜

JavaScript/VSCode/Node Setup for Dashy 💜 💜 💜

💜 Visual Studio Code

VS Code is your code editor.

Extensions (Install + Enable)

  • Smart Semicolon (autoinserts semicolons)
  • ESLint (autocorrects common code formatting mistakes)
  • Prettier (auto-formats code to make it look prettier)
  • Quokka (runs JS code inline so you can see results real-time)
  • JavaScript (ES6) Code Snippets (shortcuts to produce commonly used code segments)

Configurations

  • Ctrl+Shift+P > Type settings.json > Preferences: Open User Settings (JSON)
  • Copy-pasta the following code into the above settings.json file
{
  "editor.formatOnSave": true,
  "prettier.jsxSingleQuote": true,
  "prettier.singleQuote": true,
  "emmet.includeLanguages": {
    "javascript": "javascriptreact"
  },
  "editor.tabSize": 2,
  "editor.wordWrap": "on",
  "editor.fontSize": 13,
  "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\git-cmd.exe",
  "terminal.integrated.shellArgs.windows": [
    "--command=usr/bin/bash.exe",
    "-l",
    "-i"
  ],
  "smartsemicolon.autoLineChange": true,
  "javascript.updateImportsOnFileMove.enabled": "always",
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "typescript.updateImportsOnFileMove.enabled": "always",
  "security.workspace.trust.untrustedFiles": "open",
  "terminal.integrated.defaultProfile.windows": "Git Bash",
  "editor.linkedEditing": true,
  "editor.formatOnPaste": true,
  "editor.bracketPairColorization.independentColorPoolPerBracketType": true
}

💜 Git Integration

Git is your version control system - it saves all your code files as you update them, so that you never lose progress/can revert to past working versions of code in case you made a bad edit.

ssh-keygen -R github.com
ssh-keygen -t ed25519 -C "your_email@example.com"
  • Pull in remote Git code into your PC: git clone git@github.com:aoyshi/dashyjs.git
  • Create your own branch: git checkout -b "dashy/first-commit"
  • Add + push your changes to the remote repo: git commit -am "my first commit"; git push

💜 Node and NPM Installation

  • JavaScript is a programming language, and a code engine is required to run it. NodeJS is that engine that runs JS code on your PC.
  • "node modules" are helpful packages of code that other developers have created, which you can reuse for your projects.
  • NPM is the package management system that lets you install/uninstall these useful "node modules" from other devs.
  • NVM is the management system that lets you install/uninstall different versions of NodeJS and NPM.

Run the following in Git Bash VS Code Terminal

  • Install NVM in Windows: Go to https://github.com/coreybutler/nvm-windows/releases/tag/1.1.11 and install nvm-setup.exe
  • Modify VS Code to run as administrator (or else it won't have access to NVM): C:\Program Files\Microsoft VS Code\Code.exe > RightClick > Properties > Compatibility Tab > Run as administrator (checked)
  • Reopen VS Code and run this in the integrated Git Bash terminal to verify: nvm -v
  • Install Node: nvm install node and verify node -v
  • Install NPM: nvm install-latest-npm and verify npm -v
  • Worst case scenario, if none of these work, run the following three lines in Git Bash:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

💜 Running The Code

  • Pull in remote Git code into your PC by running this in your GitBash VSCode Terminal: git clone git@github.com:aoyshi/dashyjs.git
  • Install all node modules required by this code: npm install
  • Go into the sourcecode directory: cd dashyjs/src
  • Run the main code file and see the output in the terminal: node main.js

💜 First Discord Bot

The intro instructions here are pretty good (but the actual code needs tweaking to make it work with the latest Discord.js API)! >> https://www.freecodecamp.org/news/create-a-discord-bot-with-javascript-nodejs/

About

JavaScript/Visual Studio Code Setup for Dashy <3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published