scrs

1.1.0 • Public • Published

scrs

styled-components render static

npm i -g scrs

CLI

// App.js
import React from 'react'
import styled from 'styled-components'

const Heading = styled.h1`
  color: tomato;
`

export default props => (
  <React.Fragment>
    <head>
      {props.styles}
    </head>
    <Heading>
      Hello
    </Heading>
  </React.Fragment>
)
scrs App.js > index.html

Node API

const React = require('react')
const scrs = require('scrs')
const App = require('./App')

const html = scrs(props => (
  React.createElement(App, props)
))

Options

  • --svg (boolean) use SVG doctype instead of HTML

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i scrs

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

4.97 kB

Total Files

7

Last publish

Collaborators

  • jxnblk