YASD (yeat another script downloader)
What is Yasd?
It's just what it's name claims to be, a lightweight library to inject javascript files into an html document (header). It's best suited for application tht download scripts on-demand, or just a simple dependency downloader. Yasd always injects scripts with "async" attrbite. It also features mapping, callbacks, event like calls and path prefixing.
Usage
A sample of it's different use cases looks like this:
; //Path prefixing supportyasdpath = '/scripts/'; ; yasd; //Map of aliases supportyasdmap = 'myAlias': '//just.some.host.com/justAScript.js' 'myOtherAlias': 'someScript.js'; ; yasd;
Compatibility
Yet to be tested!
Build Yasd
Yasd uses grunt (grunt-cli should be installed) and npm to be built:
npm install -dev
grunt
Testing
For testing Yasd it is required to have all dev dependencies installed with npm install -dev
npm test