1.0.5 • Published 1 year ago

@ray.js/cli v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Ray.js

Javascript rendering server

Get started

  1. Install globally
npm i -g @ray.js/cli
  1. Init a new project
ray init
  1. Start the server
ray start

Server

  • Supported entry file-types: .html .md .js .jsx .ts .tsx
  • Resolves both /route/index.ext and /route.ext
  • If a routes dir presents, all routes will default to it
  • A route to a static asset must include /public/ in pathname
www
├─ public
│  └─ styles.scss
├─ about
│  └─ index.html
└─ index.jsx
// www/index.jsx

export default (req, res) => {
  req.config		// configuration object
  req.params		// parsed query parameters
  req.cookie		// parsed cookie

  res.json(object)	// json response helper
  res.redirect(url)	// redirect helper
  res.jsx(component)	// render jsx to html
  res.image(component)	// render jsx to image
}

Dependencies

astring
chokidar
cli-color
esbuild
highlight.js
html-tags
marked
meriyah
mime
sass
selenium-webdriver
sharp
svgo
ws
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.14

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

0.1.0

1 year ago

0.2.0

1 year ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago