@mocoding/react-app
v1.0.2
Published
Bootstrap and Build System for React Web Application. Batteries included.
Downloads
5
Readme
@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.