rdx
v4.18.0
Published
An HTML, ES2016, JSX compiler.
Downloads
21
Readme
RDX
An HTML, ES2016, JSX compiler.
Badge
[![RDX Enabled](https://img.shields.io/badge/rdx-enabled-blue.svg?style=flat-square)](http://rdx.resist.design)
Usage
Compile modern HTML web applications that include ES6+ JavaScript and JSX code.
- Compile:
rdx compile -a src/path/app-name.html
- Serve:
rdx serve -a src/path/app-name.html --open
- Example app: https://github.com/resistdesign/rdx-example
Installation
- Requires:
- NodeJS 4+
- NPM 3+
- Run:
npm i -g rdx
Commands
-h
: Usage/Help (All Commands). Example:rdx app -h
-v
: Display the current RDX version.app
: Create an app with the default RDX structure.serve
: Serve an HTML application for live development.- WebPack Dev Server: https://webpack.github.io/docs/webpack-dev-server.html
compile
: Compile an HTML application for deployment.
Configure
Command flag values may be pre-configured by declaring them in the package.json
file for a given project.
Example:
{
"name": "example-app",
...
"rdx": {
"serve": {
"proxy": "http://example.com:80"
}
}
}
NOTE: Flag values passed in the command line will supersede any pre-configured values.
Supported Features
- Multiple HTML Apps Per Project
- Multiple JS Apps Per HTML App
- Images (PNG, JPG, SVG, ICO)
- Include in HTML:
<img src="/folder/file.svg">
- Just link for deployment:
<link rel="something" href="/folder/file.svg">
- Just link for deployment:
- Import in JS:
import MySrc from './folder/file.svg';
- Use in JSX:
<img src={MySrc}/>
- Use in JSX:
- Fonts (WOFF, TTF, EOT, SVG, OTF)
- CSS/LESS/SASS/SCSS (Auto-Prefixed)
- Hot reloading supported when imported into JS files.
- ES6+ (Stage 0)
- JSX
Tech
- WebPack: https://webpack.github.io
- Babel: https://babeljs.io
- React Hot Loader: https://gaearon.github.io/react-hot-loader
License
MIT