0.8.1 • Published 4 years ago

ratt v0.8.1

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

react-all-the-things

Convert View + template to React component

const View = require('View');
const template = require('templates/test');

const view = View.extend({
    init() {
        this.$el.append(template.render());
    }
});

+

<!-- templates/test.html -->
<div class="layout">
  <div class="title">
    <p>{title}</p>
  </div>

  <div class="buttons"></div>
</div>

const View = require('View');

const view = View.extend({
    init() {
        this.$el.append((
            <div className="layout">
              <div className="title">
                <p>{title}</p>
              </div>

              <div className="buttons"></div>
            </div>
        ));
    }
});

Installation

npm install -g ratt

Usage

$ ratt
Usage: ratt [options] <file>

Options:
  -w, --write           Write result to file instead of printing to stdout
  --templates           Path to templates, default 'platform'
  --externals           Print external references found. Works with .html files only
  -v                    Print version number
0.8.1

4 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.1

5 years ago

0.4.0

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago