Managing dependencies and lock files
In Chapter 2, The Toolchain, we learned how Deno enables us to do dependency management. In this section, we'll use it in a more practical context. We'll start by removing all the scattered imports with URLs from our code and move them into a central dependency file. After this, we'll create a lock file that makes sure our still young application runs smoothly anywhere it is installed. We'll finish by learning how can we install the project's dependencies based on a lock file.
Using a centralized dependency file
In the previous chapter, you probably noticed that we were using direct URLs to dependencies directly in our code. Even though this is possible, this was something we discouraged a few chapters ago. It worked for us in that first phase, but as the application starts growing, we'll have to manage our dependencies properly. We want to avoid struggles with conflicting dependency versions, typos in the URLs...