Skip to content

Instantly share code, notes, and snippets.

@kberg
Last active September 22, 2020 03:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kberg/4bc227e403c23751559cdd5b084fa89f to your computer and use it in GitHub Desktop.
Save kberg/4bc227e403c23751559cdd5b084fa89f to your computer and use it in GitHub Desktop.
konigsberg's TM development notes

Quick links:

Current PRs

Simple notes

When you run npm run start, it reads package.json, specifically 'scripts' So npm run start seems to launch the 'start' script there. It runs server.js, which is server.ts, and you can tell because at the bottom it logs stuff.

Running works with launch.json listed at the bottom. Remember to build first with Ctrl-Shift-B!

Setting up a new repo

git remote add parent https://github.com/bafolts/terraforming-mars.git

Git tips:

Renaming a branch

git branch -m old_branch new_branch         # Rename branch locally    
git push origin :old_branch                 # Delete the old branch    
git push --set-upstream origin new_branch   # Push the new branch, set local branch to track the new remote

Steps to sync with parent:

git checkout master
git pull parent master
git push origin master
git checkout ares
git pull parent ares
git push origin ares

If there are any conflicts, it’s a bad sign.

https://stackoverflow.com/questions/14489109/how-to-alias-git-checkout-to-git-co

launch.json

Example contents of launch.json

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [

    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "skipFiles": [
        "<node_internals>/**"
      ],
      "program": "${workspaceFolder}/dist/server.js",
      "outFiles": [
        "${workspaceFolder}/**/*.js"
      ]
    }
  ]
}

Chosta comments

my workspace settings look like this atm: "workbench.colorTheme": "Visual Studio Dark", "diffEditor.ignoreTrimWhitespace": false, "tsimporter.doubleQuotes": true, "npm.exclude": "", "javascript.preferences.quoteStyle": "double", "typescript.preferences.quoteStyle": "double", "editor.tabSize": 4, "typescriptHero.imports.stringQuoteStyle": """, "typescriptHero.imports.grouping": ["Plains", "Modules", "Workspace"], // PRETTIER enable formatOnSave to start it "editor.formatOnSave": false, "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "prettier.tabWidth": 4, "prettier.quoteProps": "preserve",

vue devtools for chrome does help when you want debug state and props, so highly recommended The creator of the project Brian decided to avoid heavy dependancies on libraries so a lot of core functionality is hardcore raw coding (see server.ts). I personally like the approach of use only what you need

Notes on debugging:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment