StealJS is an independent code manager and packaging tool, which allows us to load JavaScript and other file types into an application, concatenate multiple JavaScript or CSS files, and compress their content. StealJS provides cross-browser message logging, code generators, and a simple package management tool.
In this chapter, we will go through all the StealJS features.
Dependency management is a tool, which provides an organized way for managing software components to work together as a one system.
The following are a few StealJS key features:
We have used StealJS many times in the previous chapters. Let's have a closer look at it now.
Using StealJS, we can load files as follows:
steal( 'file_one', 'file_two', function ($) { } );
These files are loaded in parallel and in a random order. If file_two
has dependences in file_one
, we can wait for file_one
before starting to fetch file_two
, as follows:
steal( 'file_one').then( 'file_two', function ($) { } );
52.15.176.80