Sortie/ Sortie.js |
Sortie/ Sortie.jsMain file for Sortie. Contains the Sortie namespace and the Sorite.Core preprocessor Copyright2005-2006 Rohan (robrohan@gmail.com). All rights reserved Summary
CoreCore acts as a pre processor. You can use Core in include javascript libraries from with javascript code, and you can also ad “require” statements to your libraries if your library depends on some other library. For example, to include libraries - from your applications main startup area you could do the following: After you have all the js files the application needs you call Sortie.Core.Include() to load all the libraries. See the Events.html example for a working example. In addition to including files, your library can use Core to check to see if a required library exists. To check, in your library code, you add something like the following at the start of the file: c stands for class, and v stands for version. Version is optional, but if the libaray adds metadata to the class (the “VERSION” property) the version is checked and if older than required there is an error. After the Sortie.Core.Include() is run, the environment is checked for the existence of the class (or function) passed in c. At present the require and include commands are the only supported pre processor commands. | Command | Params | NamespaceSortie Summary
|
the current version
Sortie.VERSION
set this to true to turn on debug mode and use this in your code if you want to branch based on debug mode
Sortie.DEBUG
Main pre processor function.
this["$"] = function( e )
the current version
Sortie.Core.VERSION