Giter Site home page Giter Site logo

nodejs-yui3's Introduction

YUI Bootstrapper for Node.js

The YUI3NodeJS project uses several 3rd party open source libraries and tools.

This file summarizes the tools used, their purpose, and the licenses under which they’re released.

This node.js module attempts to setup and bootstrap a working YUI 3 instance.

This module includes support for remote script loading via Y.Get.script() and remote data fetching via Y.io.

See “JSDom Support” below for DOM manipulation.

Node.js

All of the examples and tests assume you have node in your path and they are all executable.

Dependencies

All dependencies are installed when you install the yui3 package via npm

For server side dom manipulation, you need the following packages installed:

JSDom : LICENSE

npm install jsdom

HTML Parser : LICENSE

npm install htmlparser

Optional Dependancies

Express : LICENSE (MIT)

npm install express

Connect : LICENSE (MIT)

npm install connect

Installing – via NPM

npm install yui3

Installing – as a developer

You must have git and npm installed before you can develop.

git clone git://github.com/davglass/nodejs-yui3.git
cd nodejs-yui3/
npm install .

Using YUI3

This is the general-dom example

Remote Fetching

This example shows fetching a remote document and then using Node to modify it

Using the Y.Browser object

To comply with the “no-globals” CommonJS spec, there is no global document or window in this mode.
Just including the nodejs-dom module will create a fake dom for this instance.
You can create a document like this:
View this Gist

You can make older DOM code run by setting up a couple of local variables, like this

If you are using YUI to serve pages, you should use a Nested Use to create the document when the request comes in.

Something like this

I have an example showing this: examples/y-browser.js

Examples

    cd examples/
    ./general-dom.js
    ./io.js
    ./library.js
    ./y-brower.js

Tests

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.

Testing is pretty simple now once you install `yuitest`:

    npm install yuitest
    yuitest ./tests/*.js

License

This software is offered under the terms of the BSD license. See the LICENSE file or the YUI License for license text and copyright information.

Contribute

Your contributions are welcome! Please review the YUI contributor guide before contributing. If you haven’t contributed to a YUI project before, you’ll need to review and sign the YUI CLA before we can accept your pull request.

nodejs-yui3's People

Contributors

davglass avatar isaacs avatar opichals avatar chrisklaiber avatar reid avatar tmpvar avatar insaindesign avatar rhyolight avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.