Setup
Now that we know the more about the concepts, let's scaffold out the basics of our project
Let's Build!
mkdir pokemon-game
cd pokemon-game
# this creates a node.js project with all the defaults
yarn init -y
# add the necessary dependencies as "devDependencies"
yarn add -D typescript ts-node @types/node
# initialize our Typescript project
yarn tsc --init
# it's always a good idea to keep your source data in a single directory
mkdir src
# here's the entry point to our app
touch src/index.ts
# create a .gitignore file so our node_modules aren't picked up
echo 'node_modules' > .gitignore
# add git to our project
git init
# add everything (excluding the node_modules in our .gitignore)
git add .
# save the game!
git commit -m "initial commit"Last updated