Packages

Expansive can be extended by installable packages to provide content and extended functionality. Expansive uses packages to deliver content, plugins and skeletons. Expansive has a wide variety of extension packages to make your development more productive.

The Pak Manager

Expansive uses the amazing Pak package manager. The Pak utility is used to install, manage, upgrade and uninstall packages for Expansive.

For example, to install jQuery using Pak:

$ pak install jquery
[Install] jquery 1.11.1

Behinds the scenes, Pak has downloaded jquery into your local Pak cache — typically ~/.paks, installed jQuery into the local paks directory, and added jQuery to the list of dependencies in the package.json. When Expansive next renders the site, it will notice that jQuery has provided the jquery.js script and Expansive will automatically generates a reference for jquery.js in the generated HTML. In this way, many Expansive extension packages, can just be installed and they self-configure into your application.

This is what the dist/index.html home page now looks like:

<html>
<head>
    <title>Blog</title>
</head>
<body>
    <h1>Hello World with Layouts</h1>
    <script src="lib/jquery/jquery.js"></script>
</body>
</html>

Want More?

Read more about packages with:

© Embedthis Software. All rights reserved.