Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 71 lines (42 sloc) 1.741 kb
a608d33 @davglass Initial Import
authored
1 h1. YUI Bootstrapper for Node.js
2
3 This node.js module attempts to setup and bootstrap a working YUI 3 instance.
4
45e90aa @davglass Updated README with new IO calls
authored
5 This module includes support for remote script loading via Y.Get.script() and remote data fetching via Y.io.
a608d33 @davglass Initial Import
authored
6
04778c4 @davglass Moved around source and examples
authored
7 See "JSDom Support" below for DOM manipulation.
8
9 h2. Node.js
10
d06e29f @davglass README Updates
authored
11 All of the examples and tests assume you have @node@ in your path and they are all executable.
a608d33 @davglass Initial Import
authored
12
5c83119 @davglass Updated README and removed submodule
authored
13
62c75ff @davglass README updated
authored
14 h2. Installing - via NPM
a608d33 @davglass Initial Import
authored
15
62c75ff @davglass README updated
authored
16 <pre class="console">
17 npm install yui3
18 </pre>
a608d33 @davglass Initial Import
authored
19
62c75ff @davglass README updated
authored
20 h2. Installing - as a developer
bc5be79 @davglass Updated README
authored
21
22 <pre class="console">
62c75ff @davglass README updated
authored
23 git clone git://github.com/davglass/nodejs-yui3.git
24 make dev
8db703f @davglass Finishing up some docs - npm published
authored
25 make install
bc5be79 @davglass Updated README
authored
26 </pre>
a608d33 @davglass Initial Import
authored
27
8db703f @davglass Finishing up some docs - npm published
authored
28 h2. Using YUI3
29
30 "This is the general-dom example":http://gist.github.com/541501
31
32
c4facb3 @davglass Added Y Browser example
authored
33 h2. Using the Y.Browser object
34
35 To comply with the "no-globals" CommonJS spec, there is no global document or window in this mode.
36 Just including the nodejs-dom module will create a fake dom for this instance.
37 You can create a document like this:
d06e29f @davglass README Updates
authored
38 "View this Gist":http://gist.github.com/359776
39
40 You can make older DOM code run by setting up a couple of local variables, "like this":http://gist.github.com/359778
c4facb3 @davglass Added Y Browser example
authored
41
42
43 If you are using YUI to serve pages, you should use a Nested Use to create the document when the request comes in.
44
d06e29f @davglass README Updates
authored
45 "Something like this":http://gist.github.com/359781
c4facb3 @davglass Added Y Browser example
authored
46
47
3923dca @davglass README updates
authored
48 I have an example showing this: @examples/y-browser.js@
c4facb3 @davglass Added Y Browser example
authored
49
50
04778c4 @davglass Moved around source and examples
authored
51 h2. Examples
a608d33 @davglass Initial Import
authored
52
53 <pre class="console">
04778c4 @davglass Moved around source and examples
authored
54 cd examples/
55 ./general-dom.js
56 ./io.js
57 ./library.js
3923dca @davglass README updates
authored
58 ./y-brower.js
a608d33 @davglass Initial Import
authored
59 </pre>
60
04778c4 @davglass Moved around source and examples
authored
61 h2. Tests
62
63 When using JSDom, All relevent YUI 3 Dom & Selector tests pass. The ones that are skipped revolve around styles and postioning. Since there is no window or CSS cascade, these seem unimportant at the moment.
a608d33 @davglass Initial Import
authored
64
65 <pre class="console">
04778c4 @davglass Moved around source and examples
authored
66 cd ./tests/
67 ./dom.js
68 ./selector.js
a608d33 @davglass Initial Import
authored
69 </pre>
70
Something went wrong with that request. Please try again.