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
!
git remote add parent https://github.com/bafolts/terraforming-mars.git
- Renaming a branch on github:.
- https://gist.github.com/lttlrck/9628955
- https://stackoverflow.com/questions/4911794/git-command-for-making-one-branch-like-another
- Undo merge conflicts:
git merge --abort
- Check out remote branch: git checkout --track origin/master
- Git squarsh.
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
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
{
// 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"
]
}
]
}
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:
- https://code.visualstudio.com/docs/nodejs/nodejs-debugging
- https://code.visualstudio.com/docs/typescript/typescript-tutorial
- https://medium.com/@PhilippKief/how-to-debug-typescript-with-vs-code-9cec93b4ae56
- https://github.com/microsoft/vscode-recipes/tree/master/debugging-mocha-tests
- https://gist.github.com/paambaati/54d33e409b4f7cf059cc