1.1.0 • Published 8 years ago

themible v1.1.0

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
8 years ago

themible

Themible Module to set up the theme (to customize the web presentation) and locales (for internationalization) of a node.js express application.

npm version Build Status Coverage Status

Installation

npm install themible

Examples

Set theme middlewares:

var themible = require('tdaf-themible');

// Express Server Code
var app = express();
try {
  themible(app, '/etc/myConfig/theme', '/context/theme', 'es');
} catch (err) {
  // Handle exception
}

The module expects three parameters and one optional:

  • app. It is the express application where middleware for themes, favicon and locales are applied.
  • themeDir. Directory with 2 subdirectories:
    • public directory with the theme web resources
    • locales with the JSON files for localization
  • themePath. URL path where the public subdirectory is published.
  • defaultLocale. It sets the default locale of the module.

Errors:

The following file has registered the errors generated by this library: errors.json

Changelog:

v1.1.0 (10-01-2016)

  • Allow to set default locale parameter.

v1.0.0 (25-06-2015)

  • First version