moduledocumentation and examples moved to the wiki.
- See the Docco annotated source code located in the docs directory.
Methods Exposed by Module and Their Corresponding Wiki Page
- delegate(role, method)
- construct([el][, data])
- base(methodName[, args...])
- set(key, value)
- setPath(path, value)
- addChild(child, name)
Modules Residing in 'Extras'
- template(string, data, scope)
specRunner.html file in
root runs each individual module's specs. Load it as a file in your browser of
choice or, if you have Node.js installed you can
npm install http-server then execute
http-server from the project root which will
serve the spec runner at
localhost:8080/specRunner.html. This is useful, for me at least, for x-platform
testing as I can just point virtual machines at the host.
When making a custom build, just uncomment the spec(s) that apply to the module you are adding, or, if you are making a new module don't forget to write the specs or we will frown at you...
A simplified version of
sudo.js is available for Node:
npm install sudoclass
sudo.js style inheritance, key-value coding (the
sudo.js Base Object), delegation, and data-mutation-observation via
Observable extension. The
sudo.js build tool is built with this.
The latest concatonated (but unminified) version of
sudo.js is always
build/debug. If you are making changes, adding new modules, or creating a custom build and need the
files to be rebuilt run:
node build sudo
This puts together the
build/debug/sudo.js file. You can make a custom build file of your own by putting an
html file into root, listing
whichever modules you want then running
node build <filename>. Note, the
.html extension is not passed.
You will need
Node.js installed as well as the
sudoclass module mentioned above along with the
walk modules (both available via npm).
The debug version,
build/debug/sudo.js, contains the Base, Container, Model, View and Observable 'modules'. Others are located, appropriately enough,
extras dir (such as a
Navigator for push-state/hash-change observation,
template for string-style templating). Others may come in the future, they may
come from you.