react-prototype

0.2.1 • Public • Published

react-prototype NPM version NPM downloads

Prototype React app like good old jQuery days.

Install

$ npm install -g react-prototype

Usage

Write some code in old nice-ish jQuery way:

// app.jsx
// we are using babel for browser
// so feel free to write ES6 code
// React, ReactDom are avaliable as global variable
const App = () => {
    return (
        <div>
            why not jQuery?!
        </div>
    )
}
 
ReactDOM.render(<App />, document.getElementById('app'))
$ rp app.jsx
# it will open http://localhost:3030 for you 

It's not enough? Okay, npmcdn.com is here to help:

# you like redux? 
$ rp --lib redux/dist/redux.js
# treated as https://npmcdn.com/redux/dist/redux.js 
# yes! benifits from npm! 
 
# one more? 
$ rp --lib a --lib b
 
# use url directly 
$ rp --lib http://...

Help

$ rp -h
 
  Prototype React app like good old jQuery days.
 
  Usage:
    rp [app.jsx]
 
    -p/--port:     server port
    -v/--version:  output version number
    -h/--help:     output help infomation
    -l/--lib:      use libraries from npmcdn.com
    -q/--quiet:    quiet mode

Related

License

MIT © EGOIST

Package Sidebar

Install

npm i react-prototype

Weekly Downloads

5

Version

0.2.1

License

MIT

Last publish

Collaborators

  • kchan