Managing Dependencies and Lock Files
Learn to make a centralized dependency file and to produce a lock file with the dependency file.
We'll cover the following...
Dependency management
Previously, we learned how Deno enables us to do dependency management. In this lesson, we’ll use dependency management 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’s installed. We’ll finish by learning how can we install the project’s dependencies based on a lock file.
Creating a centralized dependency file
Previously, 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. Using direct URLs worked for us in the first phase, but as the application starts growing, we’ll have to manage our dependencies properly. We want to avoid struggles with conflicting dependency ...