项目作者: katmai7

项目描述 :
Reason-react starter kit
高级语言: JavaScript
项目地址: git://github.com/katmai7/reason-react-rollup-starter-kit.git
创建时间: 2018-02-10T16:30:31Z
项目社区:https://github.com/katmai7/reason-react-rollup-starter-kit

开源协议:MIT License

下载


Reason-react starter kit

License: MIT

Reason starter kit for creating react library.

Getting started

Clone this repository and install its dependencies:

  1. git clone https://github.com/katmai7/reason-react-rollup-starter-kit.git
  2. cd reason-react-rollup-starter-kit
  3. yarn install

NPM scripts

  • yarn dev build lib in dev mode
  • yarn build build lib for production
  • yarn example run example server
  • yarn test run tests
  • yarn clean cleaning project

Development

Running the following command will open your default browser to example/index.html.
Any modifications inside ./src trigger a browser refresh.

  1. yarn dev

Production

Running the following command will build ./src/index.re to ./dist/your_lib_name.(cjs|es6|umd).js.

  1. yarn build

Example app

The example app is running with the webpack as one of the main builders for web apps.
Note that example app needs to build ./src/index.re file, so before running the example app, run yarn dev.

  1. yarn dev
  2. yarn example

Testing

Running the following command will run tests with Jest framework.

  1. yarn test

Cleaning

Running the following command will clean project folders that are created by bucklescript and dist/temp/(folders you don’t need to commit) folders.

  1. yarn clean

License

MIT