Permalink
Browse files

Many updates

  • Loading branch information...
davglass committed Sep 3, 2010
1 parent 674f3bf commit 1f51e6d52381cda244c40cfa4798fea198e7c2f6
View
@@ -0,0 +1,2 @@
+.git
+sandbox
View
@@ -6,12 +6,11 @@ bootstrap:
dev:
./scripts/dev.sh
-publish:
- ./scripts/publish.sh
-
+publish: bootstrap
+ npm publish .
install: bootstrap
- ./scripts/install.sh
+ npm install .
link: bootstrap
npm link .
View
@@ -16,9 +16,28 @@ All of the examples and tests assume you have @node@ in your path and they are a
h2. Dependancies
+All dependencies are installed when you install the yui3 package via @npm@
+
+For server side dom manipulation, you need the following packages installed:
+
"JSDom":http://github.com/tmpvar/jsdom : "LICENSE":http://github.com/tmpvar/jsdom/blob/master/LICENSE.txt
+
+<pre class="console">npm install jsdom</pre>
+
"HTML Parser":http://github.com/tautologistics/node-htmlparser : "LICENSE":http://github.com/tautologistics/node-htmlparser/blob/master/LICENSE
+<pre class="console">npm install htmlparser</pre>
+
+h2. Optional Dependancies
+
+"Express":http://expressjs.com/ : LICENSE (MIT)
+
+<pre class="console">npm install express</pre>
+
+"Connect"http://github.com/senchalabs/connect : LICENSE (MIT)
+
+ <pre class="console">npm install connect</pre>
+
h2. Installing - via NPM
<pre class="console">
@@ -27,8 +46,11 @@ npm install yui3
h2. Installing - as a developer
+You must have git and npm installed before you can develop.
+
<pre class="console">
git clone git://github.com/davglass/nodejs-yui3.git
+cd nodejs-yui3/
make dev
make install
</pre>
View
12 cli.js
@@ -0,0 +1,12 @@
+#!/usr/bin/env node
+
+var express = require('express');
+process.chdir(__dirname + '/lib/yui3/api/');
+
+var app = express.createServer();
+app.configure(function() {
+ app.use(express.staticProvider(process.cwd()));
+});
+app.listen(8000);
+console.log('YUI3 API Docs are available:');
+console.log('http://localhost:8000');
@@ -2,34 +2,13 @@
var sys = require('sys');
-var YUI = require("../../lib/node-yui3").YUI;
-
-// TODO: This should pass, but currently doesn't.
-// This will work for YUI core, but any submodules are in different files
-// This will work better once the 3.1.0 version of YUI is available
-// And you can combo handle all the submodules into one request.
-
-
+var YUI = require("yui3").YUI;
//require("assert").equal( global.YUI, undefined, "global yui created");
-
-//Now use non-DOM related YUI utilities
YUI({
- //Only set these if you want to load locally
- loaderPath: 'loader/loader-debug.js',
- base: './yui3/build/',
filter: 'debug',
- logExclude: {
- 'attribute': true,
- 'base': true,
- 'get': true,
- 'loader': true,
- 'yui': true,
- 'widget': true,
- 'event': true
- },
debug: true
-}).use('nodejs-dom', 'event', 'node-base', 'tabview', function(Y) {
+}).use('tabview', function(Y) {
var document = Y.Browser.document;
Y.log('JSDom testing..');
@@ -2,7 +2,7 @@
var sys = require('sys'),
fs = require('fs');
-var YUI = require("../../lib/node-yui3").YUI;
+var YUI = require("yui3").YUI;
// TODO: This should pass, but currently doesn't.
// This will work for YUI core, but any submodules are in different files
@@ -15,9 +15,6 @@ var YUI = require("../../lib/node-yui3").YUI;
//Now use non-DOM related YUI utilities
YUI({
- //Only set these if you want to load locally
- loaderPath: 'loader/loader-debug.js',
- base: './yui3/build/',
filter: 'debug',
_logExclude: {
'attribute': true,
View
@@ -33,33 +33,33 @@ YUI({
var foo = Y.one('#foo');
foo.addClass('bar');
- Y.log(document.getElementById('foo').outerHTML, 'GEBI');
- Y.log(document.getElementById('bax').outerHTML, 'GEBI');
+ Y.log(document.getElementById('foo').outerHTML, 'info', 'GEBI');
+ Y.log(document.getElementById('bax').outerHTML, 'info', 'GEBI');
//sys.puts('Inside2: ' + sys.inspect(process.memoryUsage()));
- Y.log(Y.Node.getDOMNode(Y.one('strong')));
- Y.log(Y.all('em, #bax').toString());
- Y.log(Y.Node.getDOMNode(Y.one('strong')));
+ Y.log(Y.Node.getDOMNode(Y.one('strong')), 'info');
+ Y.log(Y.all('em, #bax').toString(), 'info');
+ Y.log(Y.Node.getDOMNode(Y.one('strong')), 'info');
- Y.log(Y.all('em, u').toString());
- Y.log(Y.all('#foo, em, u, #bax'));
+ Y.log(Y.all('em, u').toString(), 'info');
+ Y.log(Y.all('#foo, em, u, #bax'), 'info');
//sys.puts('Inside3: ' + sys.inspect(process.memoryUsage()));
- Y.log(i.toString(), 'node-instance');
- Y.log(Y.Node.getDOMNode(i).outerHTML, 'HTML');
- Y.log(foo.toString(), 'node-instance');
- Y.log(foo.get('className'), 'classname');
- Y.log(Y.Node.getDOMNode(foo).outerHTML, 'HTML');
+ Y.log(i.toString(), 'info', 'node-instance');
+ Y.log(Y.Node.getDOMNode(i).outerHTML, 'info', 'HTML');
+ Y.log(foo.toString(), 'info', 'node-instance');
+ Y.log(foo.get('className'), 'info', 'classname');
+ Y.log(Y.Node.getDOMNode(foo).outerHTML, 'info', 'HTML');
- Y.log(Y.one('body'), 'BODY');
- Y.log(Y.all('body, div', null, true), 'BODY');
+ Y.log(Y.one('body'), 'info', 'BODY');
+ Y.log(Y.all('body, div', null, true), 'info', 'BODY');
- Y.log(document.body.outerHTML, 'HTML');
- Y.log(document.getElementById('foo\:bar'), 'HTML');
- Y.log(document.getElementById('foo:bar'), 'HTML');
+ Y.log(document.body.outerHTML, 'info', 'HTML');
+ Y.log(document.getElementById('foo\:bar'), 'info', 'HTML');
+ Y.log(document.getElementById('foo:bar'), 'info', 'HTML');
- Y.log(document.parentNode, 'document.parentNode');
+ Y.log(document.parentNode, 'info', 'document.parentNode');
//Y.log(document.getElementById('bax').outerHTML, 'HTML');
View
@@ -0,0 +1,18 @@
+#!/usr/bin/env node
+
+var sys = require('sys');
+
+var YUI = require("yui3").YUI;
+
+require("assert").equal( global.YUI, undefined, "global yui created");
+
+YUI({
+ filter: 'debug',
+ debug: true
+}).use('json', 'base', 'io-nodejs', 'yql', function(Y) {
+
+ console.log('YQL1: ', Y.YQL);
+ var Y2 = YUI({ filter: 'debug', debug: true }).use('*');
+ console.log('YQL2: ', Y2.YQL);
+
+});
View
@@ -46,10 +46,10 @@ YUI({
Y.YQL('select * from github.user.info where (id = "davglass")', function(r) {
//Do something here.
- sys.puts(sys.inspect(r.query));
+ Y.log(r.query, 'debug', 'yql');
});
var json = '{ "test": "one" }';
- sys.puts(sys.inspect(Y.JSON.parse(json)));
+ Y.log(Y.JSON.parse(json), 'debug', 'json');
});
@@ -10,8 +10,8 @@ YUI({
logExclude: {
'attribute': true,
'base': true,
- 'get': true,
- 'loader': true,
+ //'get': true,
+ //'loader': true,
'yui': true,
'widget': true,
'event': true
@@ -48,6 +48,6 @@ YUI({
//Y.log(Y.Node.getDOMNode(Y.one('#demo')));
//Y.log(div);
Y.log('Done..');
- Y.log(div.outerHTML, 'HTML');
-
+ //Y.log(div.outerHTML, 'HTML');
+ Y.log(Y.config.doc.outerHTML);
});
Oops, something went wrong.

0 comments on commit 1f51e6d

Please sign in to comment.