1 00:00:00,280 --> 00:00:05,830 In this lecture, we're going to create an angular application with the CLI tool. 2 00:00:05,860 --> 00:00:10,780 We previously saw a list of commands with the NG help command. 3 00:00:10,810 --> 00:00:13,060 One of the commands is called New. 4 00:00:13,090 --> 00:00:16,660 This command will create a new application for us. 5 00:00:16,690 --> 00:00:20,700 In the command line, add the new command. 6 00:00:22,710 --> 00:00:28,230 But for running this command, it's considered good practice to check out the available options for 7 00:00:28,230 --> 00:00:29,310 a new command. 8 00:00:29,340 --> 00:00:34,680 In addition, we should verify we're not missing important details about this command. 9 00:00:34,710 --> 00:00:37,550 Otherwise, we may break our application. 10 00:00:37,560 --> 00:00:42,990 We can view information about a specific command by adding the help option. 11 00:00:45,140 --> 00:00:48,710 The help option can be applied to sub commands too. 12 00:00:48,740 --> 00:00:52,880 It's important to add the two dashes to understand why. 13 00:00:52,910 --> 00:00:56,360 Let's scroll to the top of this long list of options. 14 00:00:56,390 --> 00:01:00,070 The new command requires us to give our app a name. 15 00:01:00,080 --> 00:01:04,660 For this reason, we need to add the two dashes to the help option. 16 00:01:04,670 --> 00:01:10,940 If we didn't add these characters, the CLI would have assumed the name of our app is help instead of 17 00:01:10,940 --> 00:01:13,730 giving us information about the command. 18 00:01:13,760 --> 00:01:17,420 As for the other options, they are entirely optional. 19 00:01:17,420 --> 00:01:24,260 We don't need to include these options unless we want to alter the default installation of a new project. 20 00:01:24,290 --> 00:01:29,120 We won't need these commands, but it's always good to know what our options are. 21 00:01:29,270 --> 00:01:31,440 Let's create a new project. 22 00:01:31,460 --> 00:01:35,840 In the command line, we will run the new command again. 23 00:01:35,870 --> 00:01:38,630 This time we will give our app a name. 24 00:01:38,630 --> 00:01:41,810 The name of our app will be called Basics. 25 00:01:43,850 --> 00:01:49,910 After running this command, the CLI will ask us a series of questions about our project. 26 00:01:49,940 --> 00:01:53,270 These are options to customize the project further. 27 00:01:53,300 --> 00:01:58,030 The first question we will be asked is if we would like to enable routing. 28 00:01:58,040 --> 00:02:01,940 Routing is a topic we will be exploring in a future section. 29 00:02:01,950 --> 00:02:05,900 For our first project we're going to select No. 30 00:02:05,930 --> 00:02:11,990 Next, we will be asked to select our preferred approach for writing CSS. 31 00:02:12,020 --> 00:02:17,120 If you're familiar with SASS or less, feel free to choose these options. 32 00:02:17,120 --> 00:02:19,920 We won't be using either of these languages. 33 00:02:19,940 --> 00:02:23,300 Plain CSS will work for our purposes. 34 00:02:23,330 --> 00:02:28,640 After selecting our options, the CLI will begin creating our project. 35 00:02:28,670 --> 00:02:32,360 It'll scaffold files and install a few packages. 36 00:02:32,390 --> 00:02:34,640 This process may take a while. 37 00:02:40,790 --> 00:02:45,380 The project has been successfully installed during the installation. 38 00:02:45,380 --> 00:02:47,690 You may have gotten the following warning. 39 00:02:47,690 --> 00:02:54,680 Warning LF will be replaced by CR LF If you did, it's safe to ignore this warning. 40 00:02:54,680 --> 00:02:58,430 It's a formatting issue that the CLI will resolve for you. 41 00:02:58,460 --> 00:03:01,880 Let's look at our new project In the file tree. 42 00:03:01,910 --> 00:03:04,730 We will find a new folder called Basics. 43 00:03:04,760 --> 00:03:08,510 It holds the same name we inputted in the command line. 44 00:03:08,520 --> 00:03:11,930 Taking a peek inside there are dozens of files. 45 00:03:11,930 --> 00:03:17,960 It can feel overwhelming, but we will walk through these files in an upcoming lecture before moving 46 00:03:17,960 --> 00:03:18,590 further. 47 00:03:18,590 --> 00:03:22,100 Let's test if the application is working first. 48 00:03:22,100 --> 00:03:25,880 I'm going to quickly move into this folder with my editor. 49 00:03:27,400 --> 00:03:30,700 After moving into the folder, we can start the server. 50 00:03:30,730 --> 00:03:34,570 Let's explore how to start the server in the next lecture.