title
NPM Crash Course

description
This is a beginner-friendly crash course and tutorial on NPM or the Node Package Manager. Some of what you will learn..... Install and remove modules Update modules All about package.json Set init defaults Local & global modules Dependencies & dev dependencies Listing modules Semantic Versioning NPM Scripts COMMANDS: https://gist.github.com/bradtraversy/09177818de0f43a6e74e2cd05d1fe596 BECOME A PATRON: Show support & get perks! http://www.patreon.com/traversymedia ONE TIME DONATIONS: http://www.paypal.me/traversymedia COURSES & MORE INFO: http://www.traversymedia.com FOLLOW TRAVERSY MEDIA: http://www.facebook.com/traversymedia http://www.twitter.com/traversymedia http://www.instagram.com/traversymedia NEED WEB HOSTING? https://inmotion-hosting.evyy.net/c/396530/260033/4222 NEW DISCORD CHAT SERVER: https://discord.gg/traversymedia

detail
{'title': 'NPM Crash Course', 'heatmap': [{'end': 479.492, 'start': 451.633, 'weight': 0.702}, {'end': 890.001, 'start': 800.109, 'weight': 0.793}, {'end': 2124.689, 'start': 2069.949, 'weight': 0.719}], 'summary': 'Provides a comprehensive npm crash course, covering topics such as npm usage, global package storage, dev dependencies, package.json file, lodash installation, module usage in javascript, managing dependencies in node.js and visual studio code, package.json version numbers and dependencies, and node.js global modules, offering practical examples and demonstrations.', 'chapters': [{'end': 312.866, 'segs': [{'end': 122.522, 'src': 'embed', 'start': 95.147, 'weight': 4, 'content': [{'end': 98.248, 'text': "So it's essentially just a JavaScript package manager.", 'start': 95.147, 'duration': 3.101}, {'end': 101.61, 'text': 'No Node.js skills are needed to use it.', 'start': 98.268, 'duration': 3.342}, {'end': 105.516, 'text': 'Now, when I say packages or modules, I mean the same thing.', 'start': 102.375, 'duration': 3.141}, {'end': 106.857, 'text': "They're used interchangeably.", 'start': 105.556, 'duration': 1.301}, {'end': 110.058, 'text': 'And modules are basically just JavaScript libraries.', 'start': 107.257, 'duration': 2.801}, {'end': 112.879, 'text': 'So you can install Bootstrap as a package.', 'start': 110.518, 'duration': 2.361}, {'end': 114.379, 'text': 'jQuery Lodash.', 'start': 112.879, 'duration': 1.5}, {'end': 122.522, 'text': "just about every popular library or framework or script that's available is available with NPM.", 'start': 114.379, 'duration': 8.143}], 'summary': 'Npm is a javascript package manager with a wide variety of libraries and frameworks available, making it accessible without requiring node.js skills.', 'duration': 27.375, 'max_score': 95.147, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB095147.jpg'}, {'end': 255.128, 'src': 'embed', 'start': 189.849, 'weight': 0, 'content': [{'end': 193.551, 'text': "Now there's one other site I want to show you, and that's NPMJS.com.", 'start': 189.849, 'duration': 3.702}, {'end': 197.153, 'text': 'This is basically the repository for NPM modules.', 'start': 193.911, 'duration': 3.242}, {'end': 204.116, 'text': "So if we want to search for something like, let's say, Express, which is a web framework, and we click on Express,", 'start': 197.393, 'duration': 6.723}, {'end': 209.018, 'text': "you'll see it'll take us to that documentation page, which resembles the GitHub page.", 'start': 204.116, 'duration': 4.902}, {'end': 210.258, 'text': 'It shows you how to install.', 'start': 209.098, 'duration': 1.16}, {'end': 212.84, 'text': 'It gives you some examples, some documentation.', 'start': 210.318, 'duration': 2.522}, {'end': 216.001, 'text': 'It even has the GitHub link over here if you click that.', 'start': 212.86, 'duration': 3.141}, {'end': 221.675, 'text': "And that's basically you can see it's basically the same thing.", 'start': 219.014, 'duration': 2.661}, {'end': 222.655, 'text': 'All right.', 'start': 221.695, 'duration': 0.96}, {'end': 228.398, 'text': 'So if you want to check out some some modules, I think they list like the most popular ones and things like that.', 'start': 222.756, 'duration': 5.642}, {'end': 231.319, 'text': 'But you can check that site and look around if you want.', 'start': 228.478, 'duration': 2.841}, {'end': 233.12, 'text': "But let's go ahead and get started.", 'start': 231.819, 'duration': 1.301}, {'end': 238.021, 'text': "So what I'm going to do is I'm going to create a new folder on my desktop and I'm just going to call this NPM app.", 'start': 233.2, 'duration': 4.821}, {'end': 243.743, 'text': "OK, now we're not focusing on what we're building with this application.", 'start': 239.662, 'duration': 4.081}, {'end': 248.865, 'text': "It's I just want to give you basically just an overview of how to use NPM.", 'start': 243.764, 'duration': 5.101}, {'end': 249.566, 'text': 'All right.', 'start': 249.265, 'duration': 0.301}, {'end': 251.746, 'text': "So I'm going to open this with my text editor.", 'start': 249.666, 'duration': 2.08}, {'end': 253.327, 'text': "I'm using Visual Studio Code.", 'start': 251.766, 'duration': 1.561}, {'end': 255.128, 'text': "So I'm going to say open with code.", 'start': 253.347, 'duration': 1.781}], 'summary': 'Npmjs.com is the repository for npm modules, providing documentation and examples for packages like express, a web framework.', 'duration': 65.279, 'max_score': 189.849, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB0189849.jpg'}, {'end': 299.882, 'src': 'embed', 'start': 275.29, 'weight': 5, 'content': [{'end': 281.517, 'text': 'All right now there is an integrated terminal with Visual Studio Code, but I want it over here and I want it to be bigger.', 'start': 275.29, 'duration': 6.227}, {'end': 284.24, 'text': "so I'm not going to use that, the integrated terminal.", 'start': 281.517, 'duration': 2.723}, {'end': 287.544, 'text': "Let's see, I can make this a little skinnier.", 'start': 285.401, 'duration': 2.143}, {'end': 295.473, 'text': "Okay, so let's get into some commands and then we're going to talk about the package.json file and we'll go from there.", 'start': 289.226, 'duration': 6.247}, {'end': 298.442, 'text': 'Now I realize that you may be on a different environment.', 'start': 296.181, 'duration': 2.261}, {'end': 299.882, 'text': 'You may be on a Mac or Linux.', 'start': 298.482, 'duration': 1.4}], 'summary': 'Visual studio code has an integrated terminal, but may not be suitable for all environments.', 'duration': 24.592, 'max_score': 275.29, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB0275290.jpg'}], 'start': 7.645, 'title': 'Npm crash course', 'summary': 'Covers a crash course on npm, easing intimidation of front-end developers towards command line and package managers, providing insights on npm usage, global package storage, dev dependencies, package listing, and functionalities such as installing, removing, updating, and listing packages, exploring the package.json file, understanding local and global packages, dependencies, dev dependencies, npm commands, versioning, npm scripts, and the importance of having node.js installed.', 'chapters': [{'end': 50.221, 'start': 7.645, 'title': 'Npm crash course for front-end developers', 'summary': 'Will cover a crash course on npm, intended to ease the intimidation of front-end developers towards command line and package managers, and to provide insights on npm usage, including global package storage, dev dependencies, and package listing.', 'duration': 42.576, 'highlights': ['Front-end developers are intimidated by command line and package managers Many front-end developers are intimidated by the command line and package managers, hindering their usage of NPM for package installation, removal, and updates.', 'Insights on NPM usage, including global package storage, dev dependencies, and package listing The crash course aims to provide insights on NPM usage, such as locating global packages, understanding dev dependencies versus regular dependencies, and listing installed packages.']}, {'end': 312.866, 'start': 50.281, 'title': 'Crash course on npm', 'summary': 'Provides a crash course on npm, covering its functionalities such as installing, removing, updating, and listing packages, exploring the package.json file, understanding local and global packages, dependencies, dev dependencies, npm commands, versioning, npm scripts, and the importance of having node.js installed.', 'duration': 262.585, 'highlights': ['NPM can be used to install popular libraries or frameworks such as Bootstrap, Foundation, jQuery, and Lodash, making it easy to share and reuse code. NPM allows the installation of popular libraries or frameworks like Bootstrap, Foundation, jQuery, and Lodash, facilitating easy sharing and reuse of code.', 'The chapter covers various NPM functionalities including installing, removing, updating, and listing packages or modules, delving into the package.json file, local and global packages, dependencies, dev dependencies, NPM commands and shortcuts, versioning, and NPM scripts. The chapter delves into various NPM functionalities such as installing, removing, updating, and listing packages or modules, exploring the package.json file, understanding local and global packages, dependencies, dev dependencies, NPM commands and shortcuts, versioning, and NPM scripts.', "NPM is JavaScript's package manager, which does not require Node.js skills to use, and is essential for sharing and reusing code. NPM serves as JavaScript's package manager, not requiring Node.js skills for usage, and plays a crucial role in sharing and reusing code.", 'Node.js needs to be installed to use NPM, and the NPMJS.com serves as the repository for NPM modules providing documentation and examples. Node.js installation is essential to use NPM, and NPMJS.com acts as the repository for NPM modules, offering documentation and examples for various modules.']}], 'duration': 305.221, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB07645.jpg', 'highlights': ["NPM serves as JavaScript's package manager, not requiring Node.js skills for usage, and plays a crucial role in sharing and reusing code.", 'The crash course aims to provide insights on NPM usage, such as locating global packages, understanding dev dependencies versus regular dependencies, and listing installed packages.', 'NPM allows the installation of popular libraries or frameworks like Bootstrap, Foundation, jQuery, and Lodash, facilitating easy sharing and reuse of code.', 'The chapter delves into various NPM functionalities such as installing, removing, updating, and listing packages or modules, exploring the package.json file, understanding local and global packages, dependencies, dev dependencies, NPM commands and shortcuts, versioning, and NPM scripts.', 'Many front-end developers are intimidated by the command line and package managers, hindering their usage of NPM for package installation, removal, and updates.', 'Node.js installation is essential to use NPM, and NPMJS.com acts as the repository for NPM modules, offering documentation and examples for various modules.']}, {'end': 795.847, 'segs': [{'end': 428.017, 'src': 'embed', 'start': 399.572, 'weight': 3, 'content': [{'end': 403.375, 'text': 'So next thing I want to do is talk a little bit about the package.json file.', 'start': 399.572, 'duration': 3.803}, {'end': 404.615, 'text': 'right now.', 'start': 404.275, 'duration': 0.34}, {'end': 410.742, 'text': 'the package.json file is probably the most important file in the whole node.js javascript world.', 'start': 404.615, 'duration': 6.127}, {'end': 417.208, 'text': "it's a manifest file that has all of your application info, like its name, its version, author, etc.", 'start': 410.742, 'duration': 6.466}, {'end': 418.71, 'text': "but that's not the most important part.", 'start': 417.208, 'duration': 1.502}, {'end': 428.017, 'text': 'the most important thing is that it holds all of your applications dependencies, And what I mean by dependency is the modules that it needs to work.', 'start': 418.71, 'duration': 9.307}], 'summary': 'The package.json file is vital in node.js, containing app info and dependencies.', 'duration': 28.445, 'max_score': 399.572, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB0399572.jpg'}, {'end': 479.492, 'src': 'heatmap', 'start': 451.633, 'weight': 0.702, 'content': [{'end': 456.256, 'text': 'okay, because if it has the wrong version, then, excuse me, things may break.', 'start': 451.633, 'duration': 4.623}, {'end': 464.441, 'text': "okay, you can also create scripts in your package.json file called npm scripts, and i'll get into that later.", 'start': 456.256, 'duration': 8.185}, {'end': 471.966, 'text': 'now you could manually create this file, but that would be kind of a waste of time, because we have a very simple command called npm init,', 'start': 464.441, 'duration': 7.525}, {'end': 474.568, 'text': 'which will actually create the file for us.', 'start': 471.966, 'duration': 2.602}, {'end': 479.492, 'text': "all right, so let's get back to our terminal and let's run npm init, All right.", 'start': 474.568, 'duration': 4.924}], 'summary': 'Use npm init to create package.json file for npm scripts.', 'duration': 27.859, 'max_score': 451.633, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB0451633.jpg'}, {'end': 512.995, 'src': 'embed', 'start': 484.776, 'weight': 0, 'content': [{'end': 488.46, 'text': "Now, before you run it, make sure that you're in your actual application folder.", 'start': 484.776, 'duration': 3.684}, {'end': 490.381, 'text': 'Okay, I called mine npm app.', 'start': 488.48, 'duration': 1.901}, {'end': 492.663, 'text': "So make sure you're in that and then we're going to run it.", 'start': 490.922, 'duration': 1.741}, {'end': 496.527, 'text': "And basically, it's going to take us through and it's going to ask us some questions.", 'start': 493.364, 'duration': 3.163}, {'end': 500.55, 'text': 'So the default answer is going to be in these parentheses.', 'start': 497.147, 'duration': 3.403}, {'end': 503.093, 'text': "And if you're happy with that answer, then you can just click enter.", 'start': 500.591, 'duration': 2.502}, {'end': 505.034, 'text': 'So NPM app is good.', 'start': 503.553, 'duration': 1.481}, {'end': 508.055, 'text': 'But if we wanted to, we could name it something else.', 'start': 505.214, 'duration': 2.841}, {'end': 508.795, 'text': "But that's good.", 'start': 508.155, 'duration': 0.64}, {'end': 509.896, 'text': "So I'm just going to hit Enter.", 'start': 508.856, 'duration': 1.04}, {'end': 512.995, 'text': "Version, it's going to be 1.0.0.", 'start': 510.456, 'duration': 2.539}], 'summary': 'Running npm app in application folder, asked questions, default answer in parentheses, version 1.0.0.', 'duration': 28.219, 'max_score': 484.776, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB0484776.jpg'}, {'end': 737.352, 'src': 'embed', 'start': 710.552, 'weight': 1, 'content': [{'end': 717.197, 'text': 'now, if you ever want to check what there is for a default from your command line, you can do that as well.', 'start': 710.552, 'duration': 6.645}, {'end': 722.561, 'text': "so we can do that with npm get and let's say we wanted to check the author.", 'start': 717.197, 'duration': 5.364}, {'end': 731.007, 'text': "so we can say npm get, init dash, author, dash name and you'll see we get brad traversi.", 'start': 722.561, 'duration': 8.446}, {'end': 733.369, 'text': "okay, and i'm, i'm emitting the config.", 'start': 731.007, 'duration': 2.362}, {'end': 737.352, 'text': "you can also do config get and that'll get it as well.", 'start': 733.369, 'duration': 3.983}], 'summary': "Use 'npm get' or 'config get' from command line to check default author as 'brad traversi'.", 'duration': 26.8, 'max_score': 710.552, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB0710552.jpg'}], 'start': 313.086, 'title': 'Npm version checking and package.json in node.js', 'summary': 'Covers checking the npm version, command basics, and package.json in node.js, emphasizing its role as a manifest file, the use of npm init, and customization of defaults.', 'chapters': [{'end': 398.572, 'start': 313.086, 'title': 'Npm version checking and command basics', 'summary': 'Covers checking the npm version, issues with permissions on windows, and exploring npm commands, emphasizing the use of short and long flags and the help page.', 'duration': 85.486, 'highlights': ['The NPM version 5.3.0 is used, with a mention of the release of version 5.4.', 'Issues with permissions on Windows led to a rollback to NPM version 5.3.', 'Exploring NPM commands, including the use of short and long flags.', 'The help page provides a list of all available NPM commands and their functionalities.']}, {'end': 795.847, 'start': 399.572, 'title': 'Understanding package.json in node.js', 'summary': 'Explains the importance of package.json in node.js, including its role as a manifest file for application information and dependencies, the use of npm init to create the file, customization of defaults, and the process of removing defaults.', 'duration': 396.275, 'highlights': ['Importance of package.json The package.json file is crucial in the Node.js world as it acts as a manifest file for application information and dependencies, ensuring proper functioning and deployment of the application.', 'Using npm init The npm init command simplifies the creation of package.json by guiding through a series of questions, with options to accept defaults or customize fields such as name, version, description, and license.', 'Customizing defaults Customization of defaults for package.json fields like author name and license can be done using npm config set, allowing users to personalize the default settings for their applications.', 'Removing defaults The process of removing defaults from package.json involves using npm config delete to revert fields like author name and license back to their initial defaults.']}], 'duration': 482.761, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB0313086.jpg', 'highlights': ['The package.json file is crucial in the Node.js world as it acts as a manifest file for application information and dependencies, ensuring proper functioning and deployment of the application.', 'Using npm init simplifies the creation of package.json by guiding through a series of questions, with options to accept defaults or customize fields such as name, version, description, and license.', 'Customization of defaults for package.json fields like author name and license can be done using npm config set, allowing users to personalize the default settings for their applications.', 'The NPM version 5.3.0 is used, with a mention of the release of version 5.4.']}, {'end': 1025.002, 'segs': [{'end': 890.001, 'src': 'heatmap', 'start': 800.109, 'weight': 0.793, 'content': [{'end': 809.755, 'text': "It's basically a JavaScript library that gives you a bunch of utility functions that can do things like sort arrays, loop through arrays,", 'start': 800.109, 'duration': 9.646}, {'end': 813.86, 'text': 'set timeouts and delays just all different things to do with JavaScript.', 'start': 809.755, 'duration': 4.105}, {'end': 817.605, 'text': 'And it makes it a lot easier than to just write it out with vanilla JavaScript.', 'start': 813.921, 'duration': 3.684}, {'end': 819.347, 'text': "So we're going to install that.", 'start': 818.146, 'duration': 1.201}, {'end': 824.433, 'text': "So we're going to go over here and say NPM install Lodash.", 'start': 819.647, 'duration': 4.786}, {'end': 829.355, 'text': "Now, there's one very important flag that we need here, and that's dash dash save.", 'start': 825.114, 'duration': 4.241}, {'end': 834.396, 'text': 'And what that does is it saves it to our package.json as a dependency.', 'start': 829.915, 'duration': 4.481}, {'end': 837.837, 'text': "So that's basically the most important part of this file.", 'start': 834.836, 'duration': 3.001}, {'end': 841.798, 'text': "And if we don't use dash dash save, it will get installed.", 'start': 838.277, 'duration': 3.521}, {'end': 847.479, 'text': "It'll create a node modules folder and install it, but it won't get added to this file.", 'start': 841.838, 'duration': 5.641}, {'end': 850.42, 'text': 'So we want to make sure that we have that flag.', 'start': 847.759, 'duration': 2.661}, {'end': 851.64, 'text': "So let's go ahead and run that.", 'start': 850.54, 'duration': 1.1}, {'end': 855.872, 'text': 'And what it did is it did two things.', 'start': 854.171, 'duration': 1.701}, {'end': 862.355, 'text': 'It first of all added this dependencies object and it added Lodash and it also has the version.', 'start': 855.952, 'duration': 6.403}, {'end': 866.617, 'text': "I'm gonna go over this in a little bit and what this symbol here means and all that.", 'start': 862.735, 'duration': 3.882}, {'end': 873.3, 'text': 'And then it also created a node modules folder and it put the Lodash module inside there.', 'start': 867.537, 'duration': 5.763}, {'end': 876.501, 'text': 'All right, so now we have Lodash installed.', 'start': 874, 'duration': 2.501}, {'end': 879.663, 'text': "So let's go ahead and create, oops, I didn't wanna close that.", 'start': 876.561, 'duration': 3.102}, {'end': 890.001, 'text': "let's create our entry point, which is going to be this index.js file okay, so in the root we'll say new file, index.js,", 'start': 880.163, 'duration': 9.838}], 'summary': 'Lodash is a javascript library with utility functions, installed using npm with a save flag.', 'duration': 89.892, 'max_score': 800.109, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB0800109.jpg'}, {'end': 1025.002, 'src': 'embed', 'start': 894.982, 'weight': 0, 'content': [{'end': 900.065, 'text': "very simple application that's just going to loop through an array and output it into the console.", 'start': 894.982, 'duration': 5.083}, {'end': 904.286, 'text': 'And the contents of this application and what it does does not matter at all.', 'start': 900.545, 'duration': 3.741}, {'end': 907.468, 'text': "It's just an example so you can see how modules work.", 'start': 904.626, 'duration': 2.842}, {'end': 909.549, 'text': "So we're going to create a variable.", 'start': 908.168, 'duration': 1.381}, {'end': 911.249, 'text': "I'm going to just call it an underscore.", 'start': 909.569, 'duration': 1.68}, {'end': 913.87, 'text': "That's the convention for Lodash.", 'start': 911.289, 'duration': 2.581}, {'end': 916.411, 'text': 'Lodash meaning an underscore.', 'start': 914.731, 'duration': 1.68}, {'end': 919.993, 'text': "And we're going to set that to require.", 'start': 917.032, 'duration': 2.961}, {'end': 929.875, 'text': 'OK. so whenever you install a module and you want to use it inside your application, you just want to set a variable and set it to require, and then,', 'start': 921.493, 'duration': 8.382}, {'end': 930.835, 'text': 'whatever the name is,', 'start': 929.875, 'duration': 0.96}, {'end': 932.496, 'text': 'So in this case, Lodash.', 'start': 930.895, 'duration': 1.601}, {'end': 933.676, 'text': 'All right.', 'start': 933.376, 'duration': 0.3}, {'end': 939.037, 'text': "So now what I'm going to do is just create a simple variable called numbers.", 'start': 934.756, 'duration': 4.281}, {'end': 946.199, 'text': "OK, we'll just set this to just some random numbers.", 'start': 939.057, 'duration': 7.142}, {'end': 948.858, 'text': 'All right.', 'start': 948.638, 'duration': 0.22}, {'end': 950.038, 'text': 'So we have some numbers.', 'start': 949.118, 'duration': 0.92}, {'end': 951.219, 'text': 'Now we want to loop through it.', 'start': 950.158, 'duration': 1.061}, {'end': 954.92, 'text': "And I'm going to do that using the each function that's available with a low dash.", 'start': 951.259, 'duration': 3.661}, {'end': 958.141, 'text': 'So we can say underscore dot each.', 'start': 954.98, 'duration': 3.161}, {'end': 961.282, 'text': 'And I could have called this anything.', 'start': 960.002, 'duration': 1.28}, {'end': 967.104, 'text': 'I could have called this LD and then said LD dot each.', 'start': 961.322, 'duration': 5.782}, {'end': 968.004, 'text': 'I could have did that.', 'start': 967.324, 'duration': 0.68}, {'end': 970.725, 'text': 'But the convention is to use an actual underscore.', 'start': 968.104, 'duration': 2.621}, {'end': 979.009, 'text': "So each is going to take in the actual array, so numbers, and then it's also going to take a function.", 'start': 971.665, 'duration': 7.344}, {'end': 986.954, 'text': 'All right, and then this function here is going to take in an iterator.', 'start': 979.029, 'duration': 7.925}, {'end': 990.316, 'text': "We're just going to call it number and then also an index.", 'start': 986.994, 'duration': 3.322}, {'end': 991.597, 'text': 'okay, which will be just.', 'start': 990.316, 'duration': 1.281}, {'end': 995.679, 'text': "it'll start at zero and then, each iteration, it'll go one, two, three and so on.", 'start': 991.597, 'duration': 4.082}, {'end': 999.081, 'text': 'But all we want to do here is console log the number.', 'start': 996.359, 'duration': 2.722}, {'end': 1004.569, 'text': "okay, and that's it.", 'start': 1003.248, 'duration': 1.321}, {'end': 1005.91, 'text': "that's our application.", 'start': 1004.569, 'duration': 1.341}, {'end': 1012.855, 'text': 'so we can run this in our console by just saying node and then the name of the file, which is index.js.', 'start': 1005.91, 'duration': 6.945}, {'end': 1015.957, 'text': 'we could also do just index and there we go.', 'start': 1012.855, 'duration': 3.102}, {'end': 1019.019, 'text': 'so it outputs all of the numbers in the array.', 'start': 1015.957, 'duration': 3.062}, {'end': 1021.58, 'text': 'so you can pretend that this is some big application.', 'start': 1019.019, 'duration': 2.561}, {'end': 1025.002, 'text': "it doesn't really matter as far as what we're using it for.", 'start': 1021.58, 'duration': 3.422}], 'summary': 'Example of using lodash to loop through and output array in console.', 'duration': 130.02, 'max_score': 894.982, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB0894982.jpg'}], 'start': 795.927, 'title': 'Using lodash with javascript modules', 'summary': 'Covers the installation of lodash using npm, understanding module usage in javascript, and looping through numbers with lodash, providing practical examples and demonstrations.', 'chapters': [{'end': 894.982, 'start': 795.927, 'title': 'Installing lodash library', 'summary': 'Covers the installation of lodash, a javascript library, using npm with the --save flag which adds it to the package.json file as a dependency, creating a node modules folder, and preparing for creating an entry point in an index.js file.', 'duration': 99.055, 'highlights': ['Lodash is a JavaScript library with utility functions like sorting arrays, looping through arrays, and setting timeouts. Lodash provides utility functions for various operations such as sorting arrays, looping through arrays, and setting timeouts, making JavaScript development easier.', "Using NPM install Lodash --save adds Lodash to the package.json file as a dependency. Using 'NPM install Lodash --save' ensures that Lodash is added to the package.json file as a dependency, which is crucial for managing project dependencies.", 'The --save flag saves Lodash as a dependency in the package.json file. The --save flag ensures that Lodash is saved as a dependency in the package.json file, providing a clear record of project dependencies.', 'Node modules folder is created and Lodash module is installed inside it. Running the installation command creates a node modules folder and installs the Lodash module inside it, allowing for easy access to the library.', 'Creating an entry point in index.js file for further development. Preparing to create an entry point in an index.js file, which will serve as the starting point for further development and use of the Lodash library.']}, {'end': 948.858, 'start': 894.982, 'title': 'Understanding module usage in javascript', 'summary': "Discusses the basic usage of modules in javascript, demonstrating how to use the 'require' function to import a module and create a variable, with an example of using lodash to loop through an array and output the contents into the console.", 'duration': 53.876, 'highlights': ["The chapter discusses the basic usage of modules in JavaScript, demonstrating how to use the 'require' function to import a module and create a variable, with an example of using Lodash to loop through an array and output the contents into the console. (Relevance: 5)", 'The example showcases the use of Lodash as an underscore variable, following the convention for Lodash usage. (Relevance: 4)', "The process of setting a variable to 'require' after installing a module is explained, emphasizing the necessity for using the correct name of the module to be imported, exemplified with Lodash. (Relevance: 3)", "The creation of a variable 'numbers' and its assignment to random numbers is demonstrated, showcasing a practical application within the context of module usage. (Relevance: 2)"]}, {'end': 1025.002, 'start': 949.118, 'title': 'Looping through numbers with lodash', 'summary': 'Discusses looping through an array of numbers using the each function in lodash, taking in an array and a function, and iterating through the array to output the numbers, demonstrating the application by running it in the console.', 'duration': 75.884, 'highlights': ['Using the each function in lodash to loop through an array of numbers and output the numbers in the console', 'Demonstrating the application by running it in the console', 'Explaining the convention of using an actual underscore for the each function in lodash']}], 'duration': 229.075, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB0795927.jpg', 'highlights': ['Lodash provides utility functions for various operations such as sorting arrays, looping through arrays, and setting timeouts, making JavaScript development easier.', "Using 'NPM install Lodash --save' ensures that Lodash is added to the package.json file as a dependency, which is crucial for managing project dependencies.", 'The --save flag ensures that Lodash is saved as a dependency in the package.json file, providing a clear record of project dependencies.', 'Running the installation command creates a node modules folder and installs the Lodash module inside it, allowing for easy access to the library.', 'Preparing to create an entry point in an index.js file, which will serve as the starting point for further development and use of the Lodash library.', "The chapter discusses the basic usage of modules in JavaScript, demonstrating how to use the 'require' function to import a module and create a variable, with an example of using Lodash to loop through an array and output the contents into the console.", 'The example showcases the use of Lodash as an underscore variable, following the convention for Lodash usage.', "The process of setting a variable to 'require' after installing a module is explained, emphasizing the necessity for using the correct name of the module to be imported, exemplified with Lodash.", 'Using the each function in lodash to loop through an array of numbers and output the numbers in the console', 'Demonstrating the application by running it in the console', 'Explaining the convention of using an actual underscore for the each function in lodash', "The creation of a variable 'numbers' and its assignment to random numbers is demonstrated, showcasing a practical application within the context of module usage."]}, {'end': 1342.438, 'segs': [{'end': 1174.539, 'src': 'embed', 'start': 1122.015, 'weight': 0, 'content': [{'end': 1133.459, 'text': "if we try to run it, as is if we say node index, we're going to get can't find module Lodash because we have no node modules folder with Lodash in it.", 'start': 1122.015, 'duration': 11.444}, {'end': 1136.863, 'text': 'So what we have to do is just run npm install.', 'start': 1134.28, 'duration': 2.583}, {'end': 1139.507, 'text': 'Okay, nothing else just npm install.', 'start': 1137.364, 'duration': 2.143}, {'end': 1146.518, 'text': "And what that does is it looks at the package dot JSON dependencies, and it installs anything that's inside of that.", 'start': 1139.527, 'duration': 6.991}, {'end': 1147.92, 'text': "Okay, so let's run that.", 'start': 1146.538, 'duration': 1.382}, {'end': 1151.616, 'text': 'Remember, this is the second.', 'start': 1150.475, 'duration': 1.141}, {'end': 1152.617, 'text': 'This is the my app.', 'start': 1151.656, 'duration': 0.961}, {'end': 1154.259, 'text': 'This is our initial application.', 'start': 1152.657, 'duration': 1.602}, {'end': 1156.641, 'text': 'OK, so it says added one package.', 'start': 1154.279, 'duration': 2.362}, {'end': 1158.163, 'text': "And let's take a look at my app.", 'start': 1156.681, 'duration': 1.482}, {'end': 1161.246, 'text': "And now there's a node modules folder with Lodash.", 'start': 1158.563, 'duration': 2.683}, {'end': 1167.292, 'text': 'OK, so now if we go back and we say node index, our application works.', 'start': 1161.726, 'duration': 5.566}, {'end': 1170.695, 'text': "OK, now let's do the same thing.", 'start': 1168.093, 'duration': 2.602}, {'end': 1174.539, 'text': "OK, we're going to delete everything in the second folder in my app.", 'start': 1170.715, 'duration': 3.824}], 'summary': 'Running npm install adds lodash to node modules, enabling the application to work.', 'duration': 52.524, 'max_score': 1122.015, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01122015.jpg'}, {'end': 1342.438, 'src': 'embed', 'start': 1317.893, 'weight': 2, 'content': [{'end': 1326.389, 'text': 'If I reload this Now also notice that there is now a ton of shit in this node modules folder.', 'start': 1317.893, 'duration': 8.496}, {'end': 1332.012, 'text': 'The reason for that is because gulp has a ton of its own dependencies.', 'start': 1326.99, 'duration': 5.022}, {'end': 1335.653, 'text': "So the node modules folder isn't only going to be your dependencies.", 'start': 1332.112, 'duration': 3.541}, {'end': 1337.674, 'text': "It's not going to be just this stuff.", 'start': 1336.153, 'duration': 1.521}, {'end': 1340.737, 'text': "It's going to be any dependencies that any of these have.", 'start': 1337.734, 'duration': 3.003}, {'end': 1342.438, 'text': 'So this gets huge.', 'start': 1341.197, 'duration': 1.241}], 'summary': 'Gulp has a large number of dependencies, resulting in a huge node modules folder.', 'duration': 24.545, 'max_score': 1317.893, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01317893.jpg'}], 'start': 1025.002, 'title': 'Modules and npm usage', 'summary': "Discusses the significance of using the 'save' flag in npm to manage dependencies efficiently, encompassing the exclusion of node_modules folder, installation of dependencies, and management of dev dependencies.", 'chapters': [{'end': 1342.438, 'start': 1025.002, 'title': 'Modules and npm usage', 'summary': "Discusses the importance of using the 'save' flag in npm to manage dependencies efficiently, including the process of excluding node_modules folder, installing dependencies, and managing dev dependencies.", 'duration': 317.436, 'highlights': ["Importance of using 'save' flag in npm The chapter emphasizes the importance of using the 'save' flag in npm to manage dependencies efficiently, demonstrating the process of excluding the node_modules folder, installing dependencies, and managing dev dependencies.", 'Excluding node_modules folder It is highlighted that excluding the node_modules folder when pushing an application to a Git repository is crucial to avoid clogging the application and only listing dependencies in the package.json file.', "Installing and managing dev dependencies The process of installing and managing dev dependencies, exemplified using Gulp and its plugins, is explained, including the use of '--save-dev' flag to add dev dependencies separately from regular dependencies."]}], 'duration': 317.436, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01025002.jpg', 'highlights': ["Importance of using 'save' flag in npm to manage dependencies efficiently", 'Excluding node_modules folder when pushing to Git repository is crucial', 'Process of installing and managing dev dependencies, exemplified using Gulp and its plugins']}, {'end': 1641.1, 'segs': [{'end': 1369.294, 'src': 'embed', 'start': 1342.838, 'weight': 4, 'content': [{'end': 1354.288, 'text': "And you can see why you don't want to package your application with this folder because it gets humongous depending on how big your application is and how much development tools you have running,", 'start': 1342.838, 'duration': 11.45}, {'end': 1355.188, 'text': 'and stuff like that.', 'start': 1354.288, 'duration': 0.9}, {'end': 1362.934, 'text': "Now with dev dependencies, I'm just going to kind of do the same thing here and create a new folder called My App.", 'start': 1357.09, 'duration': 5.844}, {'end': 1369.294, 'text': "And I'm going to bring over these two files.", 'start': 1365.43, 'duration': 3.864}], 'summary': 'Avoid packaging application with large folder, consider dev dependencies separately.', 'duration': 26.456, 'max_score': 1342.838, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01342838.jpg'}, {'end': 1514.636, 'src': 'embed', 'start': 1486.769, 'weight': 0, 'content': [{'end': 1490.371, 'text': "And since it's a dev dependency, we also want to include that flag again.", 'start': 1486.769, 'duration': 3.602}, {'end': 1494.974, 'text': "Because that's going to remove it from here as well as delete it.", 'start': 1491.572, 'duration': 3.402}, {'end': 1496.595, 'text': "So let's go ahead and run that.", 'start': 1495.434, 'duration': 1.161}, {'end': 1501.967, 'text': "All right, so now you can see that that's gone.", 'start': 1499.946, 'duration': 2.021}, {'end': 1503.248, 'text': "It's also been deleted.", 'start': 1502.068, 'duration': 1.18}, {'end': 1506.871, 'text': "So there's also some aliases for uninstall.", 'start': 1503.869, 'duration': 3.002}, {'end': 1511.654, 'text': "So let's get rid of gulp now, and we're going to use remove.", 'start': 1507.351, 'duration': 4.303}, {'end': 1514.636, 'text': 'So we can use uninstall or remove.', 'start': 1512.115, 'duration': 2.521}], 'summary': "Using 'npm uninstall' or 'npm remove' removes dev dependency, as seen in the example.", 'duration': 27.867, 'max_score': 1486.769, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01486769.jpg'}, {'end': 1641.1, 'src': 'embed', 'start': 1547.849, 'weight': 1, 'content': [{'end': 1550.831, 'text': "It's a regular dependency, so I'm going to say dash dash save.", 'start': 1547.849, 'duration': 2.982}, {'end': 1553.32, 'text': "So now that's removed.", 'start': 1552.219, 'duration': 1.101}, {'end': 1559.688, 'text': "If we look in node modules and we just reload this, you'll see that there's nothing in there except just the .bin.", 'start': 1553.42, 'duration': 6.268}, {'end': 1565.314, 'text': "So let's say that we want to install an earlier version.", 'start': 1560.749, 'duration': 4.565}, {'end': 1569.94, 'text': 'I think the latest version was, one second.', 'start': 1565.334, 'duration': 4.606}, {'end': 1574.244, 'text': 'We should have looked before I had installed it, but the latest version is 4.17.4.', 'start': 1571.101, 'duration': 3.143}, {'end': 1576.286, 'text': "So let's say we want to install 4.17.3.", 'start': 1574.244, 'duration': 2.042}, {'end': 1579.369, 'text': 'What we can do is we can say npm install lodash, and we can do at 4.17.3 dash dash save.', 'start': 1576.286, 'duration': 3.083}, {'end': 1597.491, 'text': 'and there we go.', 'start': 1596.87, 'duration': 0.621}, {'end': 1601.175, 'text': 'so now you can see that we have 4.17.3.', 'start': 1597.491, 'duration': 3.684}, {'end': 1606.022, 'text': "all right, so let's say that we want to update to the latest version.", 'start': 1601.176, 'duration': 4.846}, {'end': 1616.377, 'text': 'we could simply go npm update, low dash, And there we go.', 'start': 1606.022, 'duration': 10.355}, {'end': 1618.258, 'text': 'You can see that the three changed to a four.', 'start': 1616.417, 'duration': 1.841}, {'end': 1621.021, 'text': "OK, so it's as easy as that to update.", 'start': 1618.839, 'duration': 2.182}, {'end': 1624.204, 'text': "It's as easy as that to install, remove, update.", 'start': 1621.401, 'duration': 2.803}, {'end': 1627.667, 'text': "You know, it's very easy, very simple commands.", 'start': 1625.165, 'duration': 2.502}, {'end': 1629.849, 'text': "Like I said, I'm going to attach a text file.", 'start': 1628.028, 'duration': 1.821}, {'end': 1631.391, 'text': "It's going to have all this stuff for you.", 'start': 1629.929, 'duration': 1.462}, {'end': 1635.795, 'text': 'You guys can put it somewhere and you can kind of keep it as like a little cheat sheet.', 'start': 1631.771, 'duration': 4.024}, {'end': 1641.1, 'text': "All right, so let's stop for a second and let's talk about these version numbers.", 'start': 1637.316, 'duration': 3.784}], 'summary': 'Demonstration of npm package management including installation, removal, and updating of lodash package versions.', 'duration': 93.251, 'max_score': 1547.849, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01547849.jpg'}], 'start': 1342.838, 'title': 'Managing dependencies in node.js and visual studio code', 'summary': "Discusses managing regular and dev dependencies in node.js, highlighting the impact of using 'npm install' with and without the '--production' flag. it also covers the process of uninstalling, removing, and updating dependencies in visual studio code using npm, with specific examples such as removing gulp sass, installing an earlier version of lodash, and updating to the latest version.", 'chapters': [{'end': 1456.463, 'start': 1342.838, 'title': 'Managing dependencies in node.js', 'summary': "Discusses managing regular dependencies and dev dependencies in node.js, highlighting the impact of using 'npm install' with and without the '--production' flag and the difference in installed dependencies.", 'duration': 113.625, 'highlights': ["Using 'npm install' with the '--production' flag installs only regular dependencies, as opposed to including dev dependencies, reducing the size of the node_modules folder.", "Running 'npm install' without the '--production' flag installs both regular and dev dependencies, leading to a larger node_modules folder depending on the application's size and development tools used.", "The '--production' flag prevents the installation of dev dependencies, such as Gulp, resulting in a leaner production environment."]}, {'end': 1641.1, 'start': 1456.483, 'title': 'Managing dependencies in visual studio code', 'summary': 'Covers the process of uninstalling, removing, and updating dependencies in visual studio code using npm, including examples such as removing gulp sass, installing an earlier version of lodash, and updating to the latest version, demonstrating the simplicity of the commands.', 'duration': 184.617, 'highlights': ['The process of uninstalling, removing, and updating dependencies in Visual Studio Code using npm is demonstrated, including examples such as removing gulp sass, installing an earlier version of Lodash, and updating to the latest version. Demonstrates the process of managing dependencies; Examples include removing gulp sass, installing an earlier version of Lodash, and updating to the latest version.', "The command 'npm uninstall' is used to remove a specific dependency, and the use of flags such as '--save-dev' is explained. Demonstrates the usage of 'npm uninstall' command; Explains the use of flags such as '--save-dev'.", "The options for removing dependencies using aliases such as 'remove', 'rm', or 'un' are discussed, providing alternatives to the 'npm uninstall' command. Discusses the alternatives for removing dependencies using aliases; Provides options such as 'remove', 'rm', or 'un'.", 'The process of installing a specific version of a module using npm is shown, with an example of installing Lodash version 4.17.3. Demonstrates the process of installing a specific version of a module using npm; Example includes installing Lodash version 4.17.3.', 'The simplicity of commands for updating, installing, and removing dependencies using npm is highlighted, emphasizing the ease of managing dependencies in Visual Studio Code. Emphasizes the simplicity of commands for updating, installing, and removing dependencies; Highlights the ease of managing dependencies in Visual Studio Code.']}], 'duration': 298.262, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01342838.jpg', 'highlights': ["Using 'npm install' with the '--production' flag installs only regular dependencies, reducing the size of the node_modules folder.", 'The process of uninstalling, removing, and updating dependencies in Visual Studio Code using npm is demonstrated, including examples such as removing gulp sass, installing an earlier version of Lodash, and updating to the latest version.', "The '--production' flag prevents the installation of dev dependencies, resulting in a leaner production environment.", "The command 'npm uninstall' is used to remove a specific dependency, and the use of flags such as '--save-dev' is explained.", 'The process of installing a specific version of a module using npm is shown, with an example of installing Lodash version 4.17.3.', "The options for removing dependencies using aliases such as 'remove', 'rm', or 'un' are discussed, providing alternatives to the 'npm uninstall' command.", 'The simplicity of commands for updating, installing, and removing dependencies using npm is highlighted, emphasizing the ease of managing dependencies in Visual Studio Code.', "Running 'npm install' without the '--production' flag installs both regular and dev dependencies, leading to a larger node_modules folder depending on the application's size and development tools used."]}, {'end': 1890.339, 'segs': [{'end': 1759.513, 'src': 'embed', 'start': 1731.411, 'weight': 2, 'content': [{'end': 1734.712, 'text': "your application is probably going to break and you're going to have to go in.", 'start': 1731.411, 'duration': 3.301}, {'end': 1739.373, 'text': "You're going to have to look at the new documentation and then upgrade your application.", 'start': 1734.732, 'duration': 4.641}, {'end': 1743.316, 'text': "You're going to have to upgrade your syntax to match the new version.", 'start': 1739.413, 'duration': 3.903}, {'end': 1745.24, 'text': "So that's what these three numbers are.", 'start': 1743.577, 'duration': 1.663}, {'end': 1749.266, 'text': "So let's go back into Visual Studio Code and we're going to talk about the little symbols.", 'start': 1745.56, 'duration': 3.706}, {'end': 1753.71, 'text': "All right, so let's take a look at our package.json.", 'start': 1750.629, 'duration': 3.081}, {'end': 1755.671, 'text': "And let's look at our LODASH dependency.", 'start': 1753.73, 'duration': 1.941}, {'end': 1757.332, 'text': 'And we have our version number.', 'start': 1756.172, 'duration': 1.16}, {'end': 1759.513, 'text': 'But before that, we have this caret symbol.', 'start': 1757.372, 'duration': 2.141}], 'summary': 'Application upgrade required due to syntax changes and new documentation.', 'duration': 28.102, 'max_score': 1731.411, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01731411.jpg'}, {'end': 1800.72, 'src': 'embed', 'start': 1777.541, 'weight': 1, 'content': [{'end': 1788.09, 'text': "okay. so if there's been an update and there's now lodash, 4.18.0 or something like that, and they run, npm, install, that's what's going to get installed.", 'start': 1777.541, 'duration': 10.549}, {'end': 1790.972, 'text': 'is that latest minor version all right?', 'start': 1788.09, 'duration': 2.882}, {'end': 1797.897, 'text': 'now, if lodash has actually changed to five as the major version, it will not install five.', 'start': 1790.972, 'duration': 6.925}, {'end': 1800.72, 'text': "okay, it's not going to install the latest major version.", 'start': 1797.897, 'duration': 2.823}], 'summary': 'Npm install will not install the latest major version if lodash has changed to version five.', 'duration': 23.179, 'max_score': 1777.541, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01777541.jpg'}, {'end': 1869.408, 'src': 'embed', 'start': 1821.052, 'weight': 0, 'content': [{'end': 1828.274, 'text': "OK, now, if you take this off completely like that, it's going to install this exact version no matter what.", 'start': 1821.052, 'duration': 7.222}, {'end': 1833.836, 'text': "Even if there's a new patch version, it'll always stick to this exact version.", 'start': 1828.714, 'duration': 5.122}, {'end': 1842.681, 'text': 'Now, if you want to just completely replace this with an asterisk like that, what that says is install the absolute latest version.', 'start': 1834.816, 'duration': 7.865}, {'end': 1846.644, 'text': "So even if there's a Lodash five, then go ahead and install that.", 'start': 1842.741, 'duration': 3.903}, {'end': 1852.088, 'text': "And that's usually not a good idea because like I said, the major version, there's usually breaking changes.", 'start': 1846.844, 'duration': 5.244}, {'end': 1860.453, 'text': 'And if you do this and they pull down your application and they do NPM install, then there there may be some issues and it may not even run.', 'start': 1852.528, 'duration': 7.925}, {'end': 1869.408, 'text': "Okay That's why when you do npm install lodash, the default is to just keep the minor version to update.", 'start': 1860.473, 'duration': 8.935}], 'summary': 'Specify exact or latest version for npm install to avoid issues.', 'duration': 48.356, 'max_score': 1821.052, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01821052.jpg'}], 'start': 1642.253, 'title': 'Understanding package.json version numbers and dependencies', 'summary': 'Explains the meaning of the three numbers in a package.json file, and the significance of caret, tilde, and asterisk symbols in package.json dependencies, highlighting their impact on installing the latest minor, patch, or absolute latest version of a package, and the potential issues with using asterisk for major version updates.', 'chapters': [{'end': 1749.266, 'start': 1642.253, 'title': 'Understanding version numbers in package.json', 'summary': 'Explains the meaning of the three numbers separated by dots in a package.json file, where the last number represents the patch version, which fixes bugs; the middle number represents the minor version, adding new features without breaking the application; and the first number represents the major version, which applies breaking changes to the application.', 'duration': 107.013, 'highlights': ['The patch version is represented by the last number in the package.json file and is increased when bugs are fixed, without breaking the application. The patch version is represented by the last number in the package.json file and is increased when bugs are fixed, without breaking the application.', "The minor version, represented by the middle number, adds new features without breaking the application's syntax. The minor version, represented by the middle number, adds new features without breaking the application's syntax.", 'The major version, represented by the first number, applies breaking changes to the application, requiring syntax and documentation upgrades. The major version, represented by the first number, applies breaking changes to the application, requiring syntax and documentation upgrades.']}, {'end': 1890.339, 'start': 1750.629, 'title': 'Understanding package.json dependencies', 'summary': 'Explains the significance of caret, tilde, and asterisk symbols in package.json dependencies, highlighting their impact on installing the latest minor, patch, or absolute latest version of a package, and the potential issues with using asterisk for major version updates.', 'duration': 139.71, 'highlights': ['The caret symbol in package.json signifies installing the latest minor version of a dependency when running npm install, allowing for automatic installation of the latest minor version, e.g. 4.18.0.', 'The tilde symbol instructs package.json to keep the minor version and only update the patch version, ensuring installation of the latest patch version of a dependency.', 'Using an asterisk in package.json prompts the installation of the absolute latest version of a dependency, but may lead to issues due to potential breaking changes in major versions.', 'The impact of these symbols on package installation is particularly crucial when working with alpha and beta versions of applications, as they require careful version management to avoid potential issues.']}], 'duration': 248.086, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01642253.jpg', 'highlights': ['The major version, represented by the first number, applies breaking changes to the application, requiring syntax and documentation upgrades.', "The minor version, represented by the middle number, adds new features without breaking the application's syntax.", 'The patch version is represented by the last number in the package.json file and is increased when bugs are fixed, without breaking the application.', 'The caret symbol in package.json signifies installing the latest minor version of a dependency when running npm install, allowing for automatic installation of the latest minor version, e.g. 4.18.0.', 'The tilde symbol instructs package.json to keep the minor version and only update the patch version, ensuring installation of the latest patch version of a dependency.', 'Using an asterisk in package.json prompts the installation of the absolute latest version of a dependency, but may lead to issues due to potential breaking changes in major versions.', 'The impact of these symbols on package installation is particularly crucial when working with alpha and beta versions of applications, as they require careful version management to avoid potential issues.']}, {'end': 2522.032, 'segs': [{'end': 2048.503, 'src': 'embed', 'start': 2018.828, 'weight': 0, 'content': [{'end': 2022.951, 'text': "Okay If you're on a Mac or Linux, obviously it's going to be a different type of location.", 'start': 2018.828, 'duration': 4.123}, {'end': 2027.391, 'text': 'Now, since we installed NodeMon, we can run it from anywhere.', 'start': 2024.048, 'duration': 3.343}, {'end': 2031.395, 'text': 'But generally, you want to run it inside of an application directory.', 'start': 2028.152, 'duration': 3.243}, {'end': 2032.957, 'text': "So let's see what happens if we run it.", 'start': 2031.475, 'duration': 1.482}, {'end': 2040.38, 'text': "Okay So what it did is it ran our application and it's continuously watching it.", 'start': 2035.879, 'duration': 4.501}, {'end': 2048.503, 'text': "So if we go over to index JS and we just change something like let's change this to a 31 and we'll save it,", 'start': 2040.46, 'duration': 8.043}], 'summary': 'Nodemon allows running application continuously, watching for changes.', 'duration': 29.675, 'max_score': 2018.828, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB02018828.jpg'}, {'end': 2124.689, 'src': 'heatmap', 'start': 2059.906, 'weight': 2, 'content': [{'end': 2066.328, 'text': 'You can just run node monitor, watch it, and then you can just go and you know, reload your browser and your application will upload.', 'start': 2059.906, 'duration': 6.422}, {'end': 2067.268, 'text': 'All right.', 'start': 2066.969, 'duration': 0.299}, {'end': 2068.469, 'text': 'Or reload, I should say.', 'start': 2067.369, 'duration': 1.1}, {'end': 2075.713, 'text': 'Another good module for installing globally is is like a server type module.', 'start': 2069.949, 'duration': 5.764}, {'end': 2087.297, 'text': "I like to use live server, so I'm just going to stop the node mine with control C and let's go ahead and say NPM install live dash server dash G.", 'start': 2075.773, 'duration': 11.524}, {'end': 2097.847, 'text': "And then what that does is it'll allow you to run whatever directory you're in on your local host, and it'll load it up in your browser.", 'start': 2090.103, 'duration': 7.744}, {'end': 2102.23, 'text': "All right, so let's go ahead and run live server.", 'start': 2097.867, 'duration': 4.363}, {'end': 2104.731, 'text': 'And it just opens it up.', 'start': 2103.691, 'duration': 1.04}, {'end': 2107.573, 'text': "I don't have any index.html file in my folder.", 'start': 2104.791, 'duration': 2.782}, {'end': 2108.653, 'text': 'If I did, it would load.', 'start': 2107.613, 'duration': 1.04}, {'end': 2111.795, 'text': 'In fact, I guess I can do that real quick just to show you.', 'start': 2108.673, 'duration': 3.122}, {'end': 2118.559, 'text': "If we say index.html, and we'll just put an h1 here.", 'start': 2111.815, 'duration': 6.744}, {'end': 2124.689, 'text': 'and save and there we go all right.', 'start': 2121.181, 'duration': 3.508}], 'summary': 'Demonstrates using live server to load application on local host', 'duration': 27.391, 'max_score': 2059.906, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB02059906.jpg'}, {'end': 2230.652, 'src': 'embed', 'start': 2172.05, 'weight': 1, 'content': [{'end': 2178.195, 'text': "So if we say NPM list, you'll see that we just have low dash.", 'start': 2172.05, 'duration': 6.145}, {'end': 2183.419, 'text': "Now I'm actually going to install gulp again just so I can show you something.", 'start': 2178.315, 'duration': 5.104}, {'end': 2188.623, 'text': "So I'm going to say NPM install gulp and I'll just add it as a regular dependency.", 'start': 2183.479, 'duration': 5.144}, {'end': 2201.264, 'text': "Okay So now if I say NPM list, you'll see that it's going to list everything.", 'start': 2194.221, 'duration': 7.043}, {'end': 2205.105, 'text': 'Okay Including all of the dependencies of gulp.', 'start': 2201.564, 'duration': 3.541}, {'end': 2208.086, 'text': "So let's say we just want to list the top level.", 'start': 2205.726, 'duration': 2.36}, {'end': 2212.768, 'text': 'What we can do is we can say NPM list and we can add the depth flag.', 'start': 2208.367, 'duration': 4.401}, {'end': 2217.01, 'text': 'So dash dash depth, and we can set that to zero.', 'start': 2212.828, 'duration': 4.182}, {'end': 2221.888, 'text': "And then you could see it's only going to show us gulp and low dash.", 'start': 2218.706, 'duration': 3.182}, {'end': 2223.128, 'text': 'All right.', 'start': 2222.808, 'duration': 0.32}, {'end': 2230.652, 'text': "If we want to change the depth to one, it'll show us just the dependencies of gulp.", 'start': 2223.208, 'duration': 7.444}], 'summary': 'Demonstrating npm list command and managing dependencies with depth flag.', 'duration': 58.602, 'max_score': 2172.05, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB02172050.jpg'}, {'end': 2337.183, 'src': 'embed', 'start': 2313.703, 'weight': 4, 'content': [{'end': 2323.751, 'text': 'one is because if someone has your application, they may not know or they may not want to look and see what your main file is.', 'start': 2313.703, 'duration': 10.048}, {'end': 2325.513, 'text': "they don't want to go in here and see all.", 'start': 2323.751, 'duration': 1.762}, {'end': 2329.616, 'text': 'the main file is index.js, because it could be something else.', 'start': 2325.513, 'duration': 4.103}, {'end': 2332.439, 'text': 'it could be app.js or server.js.', 'start': 2329.616, 'duration': 2.823}, {'end': 2337.183, 'text': 'so npm start gives them just an easy way to start it up without even have to look, have to look.', 'start': 2332.439, 'duration': 4.744}], 'summary': 'Using npm start provides an easy way to start the application without needing to know the main file, such as index.js, app.js, or server.js.', 'duration': 23.48, 'max_score': 2313.703, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB02313703.jpg'}, {'end': 2409.741, 'src': 'embed', 'start': 2374.657, 'weight': 5, 'content': [{'end': 2374.918, 'text': 'All right.', 'start': 2374.657, 'duration': 0.261}, {'end': 2381.783, 'text': "Another reason is if you deploy to like, let's say, Heroku or something like that, some kind of platform.", 'start': 2375.878, 'duration': 5.905}, {'end': 2388.568, 'text': "a lot of times they'll look at the start script to see what file is actually going to need to need to be run.", 'start': 2381.783, 'duration': 6.785}, {'end': 2390.089, 'text': "So that's that's another reason.", 'start': 2388.648, 'duration': 1.441}, {'end': 2393.971, 'text': "Um, but start isn't, I mean you can add any script you want.", 'start': 2391.069, 'duration': 2.902}, {'end': 2401.836, 'text': "Like let's say we want, instead of having to do live server globally, let's say we want to install it locally and then create a script for it.", 'start': 2394.011, 'duration': 7.825}, {'end': 2404.338, 'text': "So what I'll do is I'll say NPM.", 'start': 2402.396, 'duration': 1.942}, {'end': 2409.741, 'text': "Actually, first of all, I'm going to remove it from the global, uh, global area.", 'start': 2405.718, 'duration': 4.023}], 'summary': 'Deploying to platforms like heroku may require specific start scripts and file configurations.', 'duration': 35.084, 'max_score': 2374.657, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB02374657.jpg'}], 'start': 1891.959, 'title': 'Node.js global modules and npm usage', 'summary': 'Covers the concept of global modules in node.js, emphasizing the installation process and benefits like nodemon. it also explains the usage of global and local npm modules, including nodemon and live server, for continuous monitoring and running of applications, managing project dependencies, and creating custom scripts with detailed examples and commands.', 'chapters': [{'end': 2018.808, 'start': 1891.959, 'title': 'Understanding global modules in node.js', 'summary': 'Explains the concept of global modules in node.js, emphasizing the installation process and the benefits, such as the example of nodemon, a module that continuously watches applications, eliminating the need for manual restarts.', 'duration': 126.849, 'highlights': ['The chapter emphasizes the concept of global modules in Node.js and the benefits, such as NodeMon, which continuously watches applications, eliminating the need for manual restarts.', 'The transcript explains the installation process of global modules using npm install -g command, which installs the module on the actual machine rather than inside the node modules folder.', "It also discusses the location of global modules using the command npm root -g, demonstrating how they are stored in a specific directory on the user's machine."]}, {'end': 2522.032, 'start': 2018.828, 'title': 'Using npm for development', 'summary': 'Covers the usage of global and local npm modules, including nodemon and live server, for continuous monitoring and running of applications, as well as managing project dependencies and creating custom scripts, with examples and commands provided in detail.', 'duration': 503.204, 'highlights': ['Nodemon allows continuous monitoring and reloading of applications, eliminating the need to manually restart the server with every change made, increasing development efficiency. Nodemon enables continuous monitoring of applications, automatically reloading them upon detecting changes, thus streamlining the development process.', 'The global installation of live server facilitates running the current directory on localhost, providing a convenient method for previewing web applications. Installing live server globally allows running the current directory on localhost, simplifying the process of previewing web applications.', "NPM list command displays the project's packages, and its depth flag allows controlling the level of detail, aiding in managing dependencies effectively. NPM list command showcases the project's packages, and the depth flag enables controlling the level of detail, assisting in efficient dependency management.", 'Custom scripts in package.json, such as start, provide a standardized method for starting applications, aiding in easy deployment and potential file name changes. Custom scripts, like start, offer a standardized approach for launching applications, simplifying deployment and accommodating potential file name modifications.', 'Creating local npm scripts, in conjunction with dev dependencies, allows customizing commands for tasks such as running live server, enhancing project-specific functionality. Generating local npm scripts, along with dev dependencies, permits tailoring commands for tasks like running live server, elevating project-specific functionality.']}], 'duration': 630.073, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/jHDhaSSKmB0/pics/jHDhaSSKmB01891959.jpg', 'highlights': ['The chapter emphasizes the concept of global modules in Node.js and the benefits, such as NodeMon, which continuously watches applications, eliminating the need for manual restarts.', 'Nodemon allows continuous monitoring and reloading of applications, eliminating the need to manually restart the server with every change made, increasing development efficiency.', 'The transcript explains the installation process of global modules using npm install -g command, which installs the module on the actual machine rather than inside the node modules folder.', 'The global installation of live server facilitates running the current directory on localhost, providing a convenient method for previewing web applications.', "NPM list command displays the project's packages, and its depth flag allows controlling the level of detail, aiding in managing dependencies effectively.", 'Custom scripts in package.json, such as start, provide a standardized method for starting applications, aiding in easy deployment and potential file name changes.', 'Creating local npm scripts, in conjunction with dev dependencies, allows customizing commands for tasks such as running live server, enhancing project-specific functionality.', 'Nodemon enables continuous monitoring of applications, automatically reloading them upon detecting changes, thus streamlining the development process.', 'Installing live server globally allows running the current directory on localhost, simplifying the process of previewing web applications.', "NPM list command showcases the project's packages, and the depth flag enables controlling the level of detail, assisting in efficient dependency management."]}], 'highlights': ["NPM serves as JavaScript's package manager, not requiring Node.js skills for usage, and plays a crucial role in sharing and reusing code.", 'The crash course aims to provide insights on NPM usage, such as locating global packages, understanding dev dependencies versus regular dependencies, and listing installed packages.', 'The package.json file is crucial in the Node.js world as it acts as a manifest file for application information and dependencies, ensuring proper functioning and deployment of the application.', 'Using npm init simplifies the creation of package.json by guiding through a series of questions, with options to accept defaults or customize fields such as name, version, description, and license.', 'Lodash provides utility functions for various operations such as sorting arrays, looping through arrays, and setting timeouts, making JavaScript development easier.', 'The process of installing and managing dev dependencies, exemplified using Gulp and its plugins', "Using 'npm install' with the '--production' flag installs only regular dependencies, reducing the size of the node_modules folder.", 'The major version, represented by the first number, applies breaking changes to the application, requiring syntax and documentation upgrades.', 'The chapter emphasizes the concept of global modules in Node.js and the benefits, such as NodeMon, which continuously watches applications, eliminating the need for manual restarts.']}