1 | # MooTools 1.5.2 Server
|
2 |
|
3 | For more information about mootools in general I suggest you visit http://mootools.net
|
4 | In short it is a library for web development, with support for OOP.
|
5 |
|
6 | Mootools Server is a stripped down version that gives you all the nice things from the mootools library, sans the browser-specific stuff
|
7 |
|
8 | # Installation
|
9 |
|
10 | * Get [Node](http://nodejs.org/)
|
11 | * run `npm install mootools`
|
12 | * Done
|
13 |
|
14 | # Usage
|
15 |
|
16 | Calling `require('mootools')` will import it into the global scope, and you'll be able to do things like
|
17 |
|
18 | var Application = new Class(
|
19 | {
|
20 | Implements: [process.EventEmitter],
|
21 | initialize: function()
|
22 | {
|
23 | //initialize here
|
24 | },
|
25 | compute: function()
|
26 | {
|
27 | //some code
|
28 | this.emit("done");
|
29 | }
|
30 | });
|
31 |
|
32 | var app = new Application();
|
33 | app.on("done", function() { /* Callback */ });
|
34 | app.compute();
|
35 |
|
36 | You can also use other things that mootools provides, like `Options` and `Events` (mootools events might not be as efficient as the native `EventEmitter` stuff)
|