lsloan / littLTI

A little LTI 1.1 consumer, written in JavaScript and based on Lance E Sloan's fiddLTI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add dependency management

lsloan opened this issue · comments

Since jQuery and the CryptoJS dependency modules have been removed from the project, README.md is the only source of instruction for downloading and installing them. The project should have some programmatic and semi-automatic way of installing those dependencies.

Like PHP, dependency management for JavaScript doesn't have a commonly used tool, like Maven for Java. There is more than one possible way to install dependencies for JavaScript. They could be loaded dynamically when the programs run. That could be used to allow a web browser do the loading. However, in some cases it may be more appropriate to install the dependencies on the server, alongside the program.

In the case of littLTI, one of the anticipated uses is in an automated load testing process. In that case, one would not want the loading of dependencies to be included in the load being tested. Therefore, it would be more appropriate to install the dependencies with the program.

There are a number of libraries capable of doing this, RequireJS being one of them. Investigate RequireJS and its alternatives and implement the use of one of them in this project for loading jQuery and CryptoJS.

npm (Node.js package manager) and bower may be good alternatives to RequireJS.

See the npm page for CryptoJS: https://www.npmjs.com/package/crypto-js

jQuery's download page recommends using Bower for installation: http://jquery.com/download/#downloading-jquery-using-bower

Note that Bower appears to use GitHub repos for installation. Beware that asking Bower to install CryptoJS may install an unofficial, non-Google version of that code.

Current dependency URLs: