Socket
Socket
Sign inDemoInstall

express-bem-xjst

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-bem-xjst

BEM-XJST engine for ExpressJS


Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

express-bem-xjst

BEMHTML engine for ExpressJS

Options

levels

Use blocks in outher directories

bemhtml({ levels: ['./views/blocks'] });
./my-site/views/
├── blocks
│   ├── button
│   │   └── button.bemhtml.js
│   ├── form
│   │   └── form.bemhtml.js
│   ├── input
│   │   └── input.bemhtml.js
│   ├── link
│   │   └── link.bemhtml.js
│   └── page
│       └── page.bemhtml.js
├── index.bemhtml.js
└── login.bemhtml.js

Example

var express = require('express');
var bemhtml = require('express-bem-xjst').bemhtml;

var app = express();

app.engine('bemhtml.js', bemhtml({ levels: ['./views/blocks'] }));
app.set('view engine', 'bemhtml.js');

app.get('/', function(req, res) {
    res.render('index', { text: 'Hello world' });
});

app.listen(3000, function() {
    console.log('Example app listening on port 3000!');
});

Keywords

FAQs

Package last updated on 07 Feb 2017

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