Grab our runtime dependencies

Grab our runtime dependencies

We’ll need to grab Knockout itself, as well as something called RequireJS. RequireJS is a library that enables us to load modules at runtime asynchronously.

There are several ways we can go about this:

  1. Download the files manually and host them.
  2. Download the files through a package manager like Bower and host them.
  3. Use a Content Delivery Network (CDN) to host both files.

We’ll keep it simple and go with the first option, but Knockout’s documentation has details on using a CDN, and more libraries like RequireJS can be searched for on cdnjs.

Let’s create an externals folder in the root of our project.

1
mkdir externals

Now download Knockout and download RequireJS into that folder. The latest and minified versions of the files should work just fine.

doc_TypeScript
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.