Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-yui

Package Overview
Dependencies
Maintainers
6
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-yui - npm Package Compare versions

Comparing version 1.3.2 to 1.4.0

8

package.json
{
"name": "express-yui",
"description": "Express extension for YUI Applications",
"version": "1.3.2",
"version": "1.4.0",
"homepage": "https://github.com/yahoo/express-yui",

@@ -15,11 +15,11 @@ "author": "Caridy Patino <caridy@yahoo-inc.com> (http://github.com/caridy)",

"dependencies": {
"express-state": "~1.1.1",
"express-state": "~1.2.0",
"debug": "*"
},
"peerDependencies": {
"express": "3.x",
"express": ">=3.x",
"yui": "^3.15.0"
},
"devDependencies": {
"express": "3.x",
"express": "4.x",
"express3-handlebars": "*",

@@ -26,0 +26,0 @@ "jshint": "~1.1.0",

@@ -17,6 +17,6 @@ Express YUI

This compontent extends express by adding a new `app.yui` member to the express
application. It is responsible for controlling and exposing both the yui
configuration and the application state on the client side as well has
controlling the yui instance on the server.
This component extends Express by adding a new `app.yui` member to the Express
application. It is responsible for controlling and exposing both the YUI
configuration and the application state on the client side as well as
controlling the YUI instance on the server.

@@ -37,19 +37,17 @@

### Features
* Control YUI config and seed modules per request.
* Provide basic configurations for CDN, debugging, and other common conditions in YUI.
* Provide middleware to serve `static` assets from origin server.
* Provide middleware to `expose` the app `state` object with the YUI config and seed URLs.
* control yui config and seed modules per request.
* provide basic configurations for cdn, debug, and other common conditions in yui.
* provide middleware to serve `static` assets from origin server.
* provide middleware to `expose` the app `state` object with the yui config and seed urls.
Usage
-----
### Extending express functionalities
### Extending Express functionality
`express-yui` is a conventional `express` extension, which means it will extend
the functionalities provided on `express` by augmenting the express app instance
functionality provided in `express` by augmenting the Express app instance
with a new member called `yui`. At the same time, `express-yui` provides a set of
static methods that you can call directly off the `express-yui` module. These
methods include utility methods and express middleware.
methods include utility methods and Express middleware.

@@ -77,5 +75,5 @@ Here is an example of how to extend an `express` app with `express-yui`:

To expose the state of the app (which includes the computed yui configuration
based on the configuration defined through the express app instance), you can
call the `expose` middleware for any particular route:
To expose the state of the app (which includes the computed YUI configuration
based on the configuration defined through the Express app instance), you can
call the `expose` middleware for any route:

@@ -120,2 +118,5 @@ ```js

[locator]: https://github.com/yahoo/locator
[locator-yui]: https://github.com/yahoo/locator-yui
```js

@@ -159,13 +160,13 @@ var express = require('express'),

As a result, any yui module under the `__dirname` folder or any npm dependency marked as
As a result, any YUI module under the `__dirname` folder or any npm dependency marked as
a locator bundle will be built by the `locator-yui` plugin, and become automatically
available on the client, and potentially on the server as well. This means you
no longer need to manually define loader metadata or any kind of yui config to load those
no longer need to manually define loader metadata or any kind of YUI config to load those
modules, and `express-yui` will be capable to handle almost everthing for you.
### Using yui modules on the server side
### Using YUI modules on the server side
Using modules on the server is exactly the same that using them on the client thru
`app.yui.use()` statement. Here is an example of the use of yql module to load the
Using modules on the server is exactly the same that using them on the client through
`app.yui.use()` statement. Here is an example of the use of YQL module to load the
weather forecast and passing the result into the template:

@@ -201,3 +202,3 @@

Ideally, you will use a CDN to serve all static assets for your application, but your
express app is perfectly capable to do so, and even serve as origin server for your CDN.
Express app is perfectly capable of doing so, and even serving as the origin server for your CDN.

@@ -210,3 +211,3 @@ ```js

With this configuration, a group called `foo` with version `1.2.3`, and `yui`
version `3.11.0`, it will produce urls like these:
version `3.11.0`, it will produce URLs like these:

@@ -216,4 +217,4 @@ * /yui-3.11.0/yui-base/yui-base-min.js

Any of those urls will be valid because `express-yui` static method produces an express app
that can be mounted under your express application to serve yui core modules and application
Any of those URLs will be valid because `express-yui` static method produces an Express app
that can be mounted under your Express application to serve YUI core modules and application
specific modules (modules compiled by [locator][] into the `build` folder).

@@ -250,3 +251,3 @@

You can find the [API Docs][] under `apidocs` folder, and you can browse it thru this url:
You can find the [API Docs][] under `apidocs` folder, and you can browse it through this URL:

@@ -253,0 +254,0 @@ * http://rawgithub.com/yahoo/express-yui/master/apidocs/index.html

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc