-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
103 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |