Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

A superset of scripts and injections on top of React App Rewired

License

Notifications You must be signed in to change notification settings

parity-js/parity-react-dapp

Repository files navigation

Parity React Dapp

Dependency Status

Tweak Create React App via React App Rewire to best integrate with dapp development.

Installation

1) Install this dependency

$> npm install parity-react-dapp --save-dev

2) Add the init script

Add to your package.json file this script:

"scripts": {
  "init": "parity-react-dapp init"
}

3) Run the init script

$> npm run init

This will add the base files (eslint config, gitignore file, etc.) to your project, add will add the required scripts to your package.json file.

Requirements

You must have an src/index.js file that exports your default component, eg:

/* src/index.js */
import React, { Component } from 'react';

export default class App extends Component {
  render () {
    return (
      <div>
        HELLO
      </div>
    );
  }
}

You get React Hot Reloading for free, without any configuration needed!

Usage

You can use these scripts just as you would with Create React App:

$> npm start  # Start the dev environment
$> npm build  # Build your project

There are a few more scripts included in here

Linting

You have included JS and CSS linting:

$> npm run lint:js   # Lint your Javascript files with eslint
$> npm run lint:css  # Lint your CSS files with stylelint
$> npm run lint      # Run both linters

About

A superset of scripts and injections on top of React App Rewired

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published