Starting the Project
Let's start the project.
Open up your terminal and create a new folder for where this code will live. Once created, go into that folder.
Now, let's initialize this folder as a git repository.
$ git init
You should then see an output saying something like:
Initialized empty Git repository in /Users/me/dev/ng-ts-tutorial/.git/
Great! We're setup to track changes through git now. We'll see how to do this in just a little bit.
Next, let's initialize the respository through npm, which will create a package.json
file for us.
$ npm init
Now, it's going to ask you a series of questions. Feel free to answer them any way you like. The defaults that it will default to though should be just fine.
Once completed, you should now see a package.json file in your folder. This file is what npm will use to save it's configuration and dependencies to. We'll see how this will be useful in just a little bit. In the next section we'll setup our grunt build.
First Commit
Let's commit the newly created package.json
file as our first commit to the project!
$ git add package.json
$ git commit -m 'initialize git and npm'
You should see something like this:
$ [master (root-commit) 3bc3cd5] initialize git and npm
1 file changed, 2 insertions(+)
create mode 100644 package.json
Congrats! You've made your first git commit. If you're coming from the TFS world, think of this as analogous to the a check-in under TFS.
Let's move forward and install the rest of the dependencies that we're going to need to create the app!