vxv-server

    3.1.0 • Public • Published

    VXV - Server

    Build Status vxv

    Simple serverside rendering for [vxv](https://github.com/herber/vxv).

    Install

    $ npm install vxv-server
    

    Usage

    VXV-Server processes your styles just like vxv does including hash prefixing. server() will return a simple string containing all your styles - you can now save those styles somewhere or send them directly to the user.

    const vxv = require('vxv');
    const server = require('vxv-server');
     
    const mainStyles = vxv`
    h1 { font-size: 2rem }
    h2 { font-size: 1.5rem }
    h3 { font-size: 1.25rem }
    h4 { font-size: 1rem }
    h5 { font-size: .875rem }
    h6 { font-size: .75rem }
    `;
     
    const otherStyles = vxv`
    p, dl, ol, ul, pre, blockquote {
      margin-top: 1em;
      margin-bottom: 1em;
    }
    `;
     
    server();
    // => All styles even those used in other files -
    // => prefixed and concatenated into single string,
    // => that you can use for serverside rendering.

    License

    MIT © Tobias Herber

    Install

    npm i vxv-server

    DownloadsWeekly Downloads

    2

    Version

    3.1.0

    License

    MIT

    Unpacked Size

    2.09 kB

    Total Files

    3

    Last publish

    Collaborators

    • tobihrbr