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

express-yui

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-yui

Express extension for YUI Applications

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
27
decreased by-49.06%
Maintainers
1
Weekly downloads
 
Created
Source

Express YUI

Express extension for YUI Applications.

Build Status

Goals & Design

This compontent extends express by adding a new member to the express application thru app.yui. This object is responsible for exposing the yui_config and yui_seed configurations into the view engine. Also, it provides a set of runtime utilities that can be used to customize the YUI config for the client side, creates a Y instance on the server side when needed to provide access to the registered modules on the server side, and provides a set of middleware to expose data into the runtime and the client side.

Installation

Install using npm:

$ npm install express-yui

Features

Features

  • expose yui config per request
  • expose seed files per request
  • provide basic configurations for cdn, debug, and other common conditions
  • provide basic middleware to server static assets from origin server, including combo capabilities built-in.
  • provide basic middleware to expose yui_config and yui_seed into the view engine so they can be used in the templates to boot YUI in the client side.

Other features

  • work with modown-locator to produce a build process by shifting any yui module in the application bundle or any other bundle.
  • provide basic express view engine to rely on views registered at the server side thru the app.yui.use() as compiled templates.

Usage

Serving static assets from app origin

app.yui.setCoreFromAppOrigin();
app.yui.setGroupFromAppOrigin('group-name');
app.use(yui.static());

If you plan to define a prefix for all static assets, then make sure you set that before defining any group, so loader can know about it. Here is the example:

app.set('yui static prefix', '/static');
app.yui.setCoreFromAppOrigin();
app.yui.setGroupFromAppOrigin('group-name');
app.use('/static', yui.static());

License

This software is free to use under the Yahoo! Inc. BSD license. See the LICENSE file for license text and copyright information.

Contribute

See the CONTRIBUTE file for info.

Keywords

FAQs

Package last updated on 24 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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