@mocoding/react-app
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@mocoding/react-app

Bootstrap and Build System for React Web Application. Batteries included.

Getting started

Create package.json with the following content:

{
  "name": "example",  
  "devDependencies": {
    "@mocoding/react-app": "*",    
  },  
  "scripts": {
    "start": "moapp serve",    
    "build": "moapp build -p"
  },
  "eslintConfig": {
    "extends": "@mocoding/eslint-config"
  },
  "prettier": "@mocoding/eslint-config/prettier"
}

Add index.tsx to the root.

import * as React from "react";

export class App extends React.Component {
  public render(): JSX.Element {
    return <div>Hello World</div>;
  }
}

Add tsconfig.json

{
  "extends": "@mocoding/react-app-common/tsconfig.base.json",
  "compilerOptions": {
    "baseUrl": "."
  }
}

Test the code:

# Restore dependencies
> yarn
# Test application in development with HMR
> yarn start
# Build application for production
> yarn build

Details

Check project github for more documentation about this module.

Readme

Keywords

none

Package Sidebar

Install

npm i @mocoding/react-app

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

52.6 kB

Total Files

74

Last publish

Collaborators

  • offbeatful