Skip to content

Commit

Permalink
feat: change web-app for typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-roque committed May 15, 2020
1 parent ee7996f commit 9ad5b77
Show file tree
Hide file tree
Showing 48 changed files with 4,438 additions and 3,291 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
docker-compose.yml
docker-data/*
database/docker-data/*
database/*
.vsls
.idea
.env
Expand Down
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']}
module.exports = { extends: ['@commitlint/config-conventional'] };
11 changes: 0 additions & 11 deletions docker-compose.dev.example
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,3 @@ services:
- DB_PORT=5432
depends_on:
- database-service

webapp-service:
container_name: app-webapp
build:
context: ./web-app
dockerfile: Dockerfile
volumes:
- ./web-app:/app
command: "npm start"
ports:
- "3000:3000"
6 changes: 1 addition & 5 deletions entrypoint-dev.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
echo "************* [REACT-DONIS-STARTER] *************"

echo "****** [CHANGELOG CONVENTION] ****** [CONFIGURING PROJECT] ******"
echo "\n"
npm install


echo "****** [API DEPENDENCIES] ****** [CONFIGURING PROJECT] ******"
echo "\n"

cd ./api
cp .env.example .env
Expand All @@ -16,15 +14,13 @@ cd ..


echo "****** [WEB-APP DEPENDENCIES] ****** [CONFIGURING PROJECT] ******"
echo "\n"
cd ./web-app
npm install
cd ..


echo "****** [DOCKER] ****** [CONFIGURING PROJECT] ******"
echo "\n"

cp docker-compose.dev.example docker-compose.yml

docker-compose up
docker-compose up -d && cd ./web-app && npm start
4 changes: 0 additions & 4 deletions entrypoint-prod.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
echo "************* [REACT-DONIS-STARTER] *************"

echo "****** [CHANGELOG CONVENTION] ****** [CONFIGURING PROJECT] ******"
echo "\n"
npm install


echo "****** [API DEPENDENCIES] ****** [CONFIGURING PROJECT] ******"
echo "\n"

cd ./api
cp .env.example .env
Expand All @@ -16,15 +14,13 @@ cd ..


echo "****** [WEB-APP DEPENDENCIES] ****** [CONFIGURING PROJECT] ******"
echo "\n"
cd ./web-app
npm install
npm run build
cd ..


echo "****** [DOCKER] ****** [CONFIGURING PROJECT] ******"
echo "\n"

cp docker-compose.prod.example docker-compose.yml

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"description": "react-donis-docker-starter",
"repository": {
"type": "git",
"url": "git+https://github.com/gabriel-roque/starwars-battle.git"
"url": "git+https://github.com/gabriel-roque/react-donis-docker-starter.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/gabriel-roque/starwars-battle/issues"
"url": "https://github.com/gabriel-roque/react-donis-docker-starter/issues"
},
"homepage": "https://github.com/gabriel-roque/starwars-battle#readme",
"homepage": "https://github.com/gabriel-roque/react-donis-docker-starter#readme",
"devDependencies": {
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
Expand Down
1 change: 0 additions & 1 deletion web-app/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Dockerfile
.dockerignore
.git/
.gitignore
node_modules/
Expand Down
22 changes: 0 additions & 22 deletions web-app/.eslintrc

This file was deleted.

45 changes: 45 additions & 0 deletions web-app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/eslint-recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"settings": {
"react": {
"version": "detect"
}
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "eslint-plugin-import-helpers"],
"rules": {
"import-helpers/order-imports": [
"warn",
{
"newlinesBetween": "always",
"groups": [
"/^react/",
"/layouts/",
"/^assets/",
"/^components/",
"/@material-ui/",
"/@fortawesome^/",
"/^utils/",
"/^redux/",
["parent", "sibling", "index"]
],
"alphabetize": { "order": "asc", "ignoreCase": true }
}
]
}
}
21 changes: 21 additions & 0 deletions web-app/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"trailingComma": "all",
"tabWidth": 2,
"noUnusedLocals": true,
"singleQuote": true,
"printWidth": 120,
"overrides": [
{
"files": "*.md",
"options": {
"tabWidth": 2
}
},
{
"files": "*.json",
"options": {
"tabWidth": 2
}
}
]
}
12 changes: 0 additions & 12 deletions web-app/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions web-app/jsconfig.json

This file was deleted.

Loading

0 comments on commit 9ad5b77

Please sign in to comment.