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

jsx-render-engine

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsx-render-engine

Library agnostic in-place JSX rendering engine. Supports react, preact, react-router etc.

  • 7.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

jsx-render-engine npm package

JSX library agnostic render engine. (react, preact, react-router etc.)

About

jsx-render-engine is a an in-place object manipulation engine to transform object content using a JSX library as template.

It is developed as part of metalsmith-react-templates.

You can easily write your own rendering strategies, but it currently supports the following out of the box:

Installation

Install the library via:

$ npm install --save jsx-render-engine

You will need to install other dependencies based on your chosen templating engine. For example:

$ npm install react react-dom prop-types // react

$ npm install preact preact-render-to-string // preact

$ npm install react-router // and everything for react.

Getting Started

import Engine from 'jsx-render-engine';

const engine = new Engine(
  files, // see "File Objects" below
  context, // see "Context Object" below
  options // see available options in /core/options.js
);

engine.render('home');
engine.render('about');

Object References

File Objects
const files = {
  home: {
    title: 'test',
    template: 'HomeTemplate.jsx',
    content: 'markdown content'
  },
  about: {
    title: 'about',
    template: 'AboutTemplate.jsx',
    content: 'markdown content'
  }
}
Context Object
const context = {
  path: (directory, file) => {},
  metadata: () => {}
}

Notes

Version jump to v7.0.0

As part of this package moving back into metalsmith-react-templates repository, the version has jumped from v0.1.2 to v7.0.0 to keep in-sync with the parent repository

License

MIT License © Gerald Yeo

Keywords

FAQs

Package last updated on 20 Sep 2018

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