Tools to manage packages in JavaScript.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Sesame - an AMD package manager for client-side JavaScript#

Sesame is a command line tool used to manage installations of client-side JavaScript packages. It integrates with AMD loaders like RequireJS.


To do.

Usage (proposed)

Install a package in a web application

Sesame manages AMD packages installed in a particular web application. Change your working directory to the root of the web application. A folder named .ssm will be generated there to contain Sesame's working data.

To install a package, you provide an identifier and a source URL.

$ cd ~/www/mywebsite
$ ssm install jquery@1.7.1

List all packages installed in a website

You can have multiple versions of any package installed. Only one version can be selected at a time. Use which to see which version of a package is currently selected, or list see a list of all packages and versions installed (the currently selected version in the list will be marked with a > character).

$ cd ~/www/mywebsite
$ ssm which jquery
$ ssm list jquery
> jquery@1.6.2

Select a package

$ cd ~/www/mywebsite
$ ssm select jquery@1.7.1
$ ssm list jquery
> jquery@1.7.1

Delete a package

$ ssm delete jquery@1.4.3
$ ssm list jquery
> jquery@1.7.1

Build optimised files for inclusion

To use packages in your web application the source files need to be built by Sesame. You give Sesame a description of your project, including what modules are used and where the source files should be built. Sesame will optimise those packages into source files that include any dependencies (according to your preferences listed in the project.json file). Finally a "meta" script that configures your preferred AMD loader to find and include these modules is generated.

$ ssm build project.json

Configure a web application to use ssm-managed packages

Once your source files are built (see above) you simply add a script tag pointing to the generated meta file, and then start requiring your modules.

<script src="/scripts/require.js"></script>
<script src="/scripts/ssmmeta.js"></script>
    require(['widgets/carousel'], function(carousel) {