Skip to content

Commit

Permalink
feat: add Readmes + fix gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
JesperBry committed Jan 6, 2023
1 parent 8473457 commit 1ef2c01
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 18 deletions.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# cra-template-ts-clean

This is a cleand version of the official typescript template form CRA. This template also extends with setting up a developing and production enviorment with Docker and Nginx (See all the commands the Makefile).

## Usage

```bash
$ npx create-react-app [name of app/location] --template ts-clean
```

## Project structure

```bash
|____node_modules
|____public
| |____favicon.ico
| |____index.html
| |____manifest.json
| |____robots.txt
|____src
| |____assets
| |____components
| | |____styles
| |____hooks
| |____utils
| |____App.css
| |____App.tsx
| |____index.css
| |____index.tsx
| |____reportWebVitals.ts
| |____setupTests.ts
| |____react-app-env.d.ts
|____.dockerignore
|____Dockerfile
|____.gitignore
|____Makefile
|____nginx.conf
|____nodemon.json
|____README.md
|____package-lock.json
|____package.json
|____tsconfig.json
```
32 changes: 32 additions & 0 deletions template/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Getting Started with Create React App

This project was bootstrapped with Create React App and the [clean-ts template](https://github.com/JesperBry/cra-template-ts-clean).

## Available Scripts

### NPM scripts

```
$ npm start
$ npm run build
$ npm test
$ npm run eject
```

### Make commands (starting docker)

NODE_V (setting spesific version for node, used by nvmrc and docker image) is a optional argument (default: 18.12.1) for both `make build-dev` and `make build-prod`. e.g. `make build-dev NODE_V=14.17.5`

Starting dev (localhost:3000)

```
$ make build-dev
$ make run-dev
```

Starting prod (starting nginx at localhost:8080)

```
$ make build-prod
$ make run-prod
```
46 changes: 28 additions & 18 deletions template/gitignore
Original file line number Diff line number Diff line change
@@ -1,59 +1,69 @@
# Created by https://www.toptal.com/developers/gitignore/api/react,visualstudiocode,dotenv,cmake

# Edit at https://www.toptal.com/developers/gitignore?templates=react,visualstudiocode,dotenv,cmake

### CMake ###
### CMake

CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
\_deps

### CMake Patch

### CMake Patch ###
# External projects
*-prefix/

### dotenv ###
\*-prefix/

### dotenv

.env

### react ###
.DS_*
*.log
### react

.DS\_\*
_.log
logs
**/*.backup.*
**/*.back.*
\*\*/_.backup._
\*\*/_.back.\*

node_modules
bower_components

*.sublime*
_.sublime_

psd
thumb
sketch

### VisualStudioCode ###
.vscode/*
### VisualStudioCode

.vscode/_
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
!.vscode/_.code-snippets

# Local History for Visual Studio Code

.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
\*.vsix

### VisualStudioCode Patch

# Ignore all local history of files

.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/react,visualstudiocode,dotenv,cmake
# End of https://www.toptal.com/developers/gitignore/api/react,visualstudiocode,dotenv,cmake

0 comments on commit 1ef2c01

Please sign in to comment.