Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 63 lines (40 sloc) 1.782 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
a608d33 @davglass Initial Import
authored
9 h2. Setup this repo
10
bac601b @davglass Updated README to remove the submodule step and add the checkout step
authored
11 Clone this project, then do this:
a608d33 @davglass Initial Import
authored
12 <pre class="console">
bac601b @davglass Updated README to remove the submodule step and add the checkout step
authored
13 cd nodejs-yui3/lib
14 git clone git://github.com/yui/yui3.git
a608d33 @davglass Initial Import
authored
15 </pre>
16
04778c4 @davglass Moved around source and examples
authored
17 You should go into that repo every now and then and do a git pull to keep it up to date with the latest YUI source.
18
19
20 h2. Node.js
21
22 These tests and examples are all known to be working with latest stable Node.js: v0.1.33
23
24 All of the examples and tests assume you nave @node@ in your path and they are all executable.
25
bac601b @davglass Updated README to remove the submodule step and add the checkout step
authored
26
04778c4 @davglass Moved around source and examples
authored
27 h2. JSDom Support
a608d33 @davglass Initial Import
authored
28
04778c4 @davglass Moved around source and examples
authored
29 Currently YUI 3 on Node.js supports "JSDom":http://github.com/tmpvar/jsom
30 It also requires my forked "node-htmlparser":http://github.com/davglass/node-htmlparser
31
32 Getting it up and running:
a608d33 @davglass Initial Import
authored
33
34 <pre class="console">
04778c4 @davglass Moved around source and examples
authored
35 mkdir ~/.node_libraries
36 cd ~/.node_libraries
37 wget http://github.com/tmpvar/jsdom/raw/master/lib/level1/core.js -O jsdom.js
38 wget http://github.com/tmpvar/jsdom/raw/master/lib/browser/index.js -O browser.js
39 wget http://github.com/davglass/node-htmlparser/raw/master/node-htmlparser.js
a608d33 @davglass Initial Import
authored
40 </pre>
41
04778c4 @davglass Moved around source and examples
authored
42 Now that the libraries are in the right places you can now use the dom related examples.
43
44 h2. Examples
a608d33 @davglass Initial Import
authored
45
46 <pre class="console">
04778c4 @davglass Moved around source and examples
authored
47 cd examples/
48 ./general-dom.js
49 ./io.js
50 ./library.js
a608d33 @davglass Initial Import
authored
51 </pre>
52
04778c4 @davglass Moved around source and examples
authored
53 h2. Tests
54
55 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.
56
57 <pre class="console">
58 cd ./tests/
59 ./dom.js
60 ./selector.js
61 </pre>
a608d33 @davglass Initial Import
authored
62
Something went wrong with that request. Please try again.