New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

x-views

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

x-views

A wrapper module of the express-handlebars for x-css.

latest
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

x-views

A wrapper module of the express-handlebars for x-css.

[![npm version][npm-badge]][npm] [![dependency status][dep-badge]][dep-status]

Installation

Install using npm:

$ npm install x-views

Usage

Same ways to use the express-handlebars:

app.js:

var express = require('express');
var x-views = require('x-views');

var app = express();
var xv = x-views({
    defaultLayout: 'main',
    extname: '.hbs'
});

app.engine('hbs', xv.engine);
app.set('view engine', 'hbs');

app.get('/', function (req, res) {
    res.render('home');
});

app.listen(3000);

views/layouts/main.hbs:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Example App</title>
</head>
<body>

    {{{body}}}

</body>
</html>

views/home.hbs:

<h1>Example App: Home</h1>

What will happen?

You can see the <style></style> tag at the end of HTML when you right-click on your browser to see the page source code.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Example App</title>
</head>
<body>

 <h1>Example App: Home</h1>

<style></style>
</body>
</html>

Note: The style tag is inserted by x-views according to x-css rules. That is the x-views' mission.

License

MIT

Keywords

css

FAQs

Package last updated on 27 Sep 2016

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