npm

@resistdesign/rdx

2.0.10 • Public • Published

RDX

An HTML, ES2016, JSX compiler.

⚠️ WARNING: DO NOT USE ON WINDOWS FOR NOW!

Badge

RDX Enabled

[![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.

  1. Compile: rdx compile -a src/path/app-name.html
  2. Serve: rdx serve -a src/path/app-name.html --open
  3. Example app: https://github.com/resistdesign/rdx-example

Installation

  1. Requires:
    • NodeJS 4+
    • NPM 3+
  2. Run: npm i -g @resistdesign/rdx

Commands

  1. -h: Usage/Help (All Commands). Example: rdx app -h
  2. -v: Display the current RDX version.
  3. app: Create an app with the default RDX structure.
  4. serve: Serve an HTML application for live development.
  5. 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

  1. Multiple HTML Apps Per Project
  2. Multiple JS Apps Per HTML App
  3. Images (PNG, JPG, SVG, ICO)
  • Include in HTML: <img src="/folder/file.svg">
    • Just link for deployment: <link rel="something" href="/folder/file.svg">
  • Import in JS: import MySrc from './folder/file.svg';
    • Use in JSX: <img src={MySrc}/>
  1. Fonts (WOFF, TTF, EOT, SVG, OTF)
  2. CSS/LESS (Auto-Prefixed)
  • Hot reloading supported when imported into JS files.
  1. ES6+ (Stage 0)
  2. JSX

Tech

  1. WebPack: https://webpack.github.io
  2. Babel: https://babeljs.io
  3. React Hot Loader: https://gaearon.github.io/react-hot-loader

License

MIT

Package Sidebar

Install

npm i @resistdesign/rdx

Weekly Downloads

2

Version

2.0.10

License

MIT

Last publish

Collaborators

  • resistdesign