Skip to content

Commit

Permalink
Merge pull request #346 from SharebookBR/develop
Browse files Browse the repository at this point in the history
Angular migration from 7 to 9
  • Loading branch information
wantero authored Jun 11, 2021
2 parents c2db8d1 + 0958aae commit 3720d44
Show file tree
Hide file tree
Showing 70 changed files with 11,205 additions and 7,326 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# base image
FROM node:12.2.0
FROM node:12

# install chrome for protractor tests
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
Expand All @@ -16,7 +16,7 @@ ENV PATH /app/node_modules/.bin:$PATH
COPY package.json /app/package.json
COPY package-lock.json /app/package-lock.json
RUN npm install
RUN npm install -g @angular/cli@7.3.7
RUN npm install -g @angular/cli@9.1.15

# add app
COPY . /app
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-local
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# base image
FROM node:12.2.0
FROM node:12

# install chrome for protractor tests
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
Expand All @@ -16,7 +16,7 @@ ENV PATH /app/node_modules/.bin:$PATH
COPY package.json /app/package.json
COPY package-lock.json /app/package-lock.json
RUN npm install
RUN npm install -g @angular/cli@7.3.7
RUN npm install -g @angular/cli@9.1.15

# add app
COPY . /app
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ https://www.linkedin.com/pulse/projeto-sharebook-raffaello-damgaard/

## 2 - ENTRE NO SLACK

https://join.slack.com/t/sharebookworkspace/shared_invite/enQtMzQ2Nzc5OTk3MDc4LTZlMmJlMjA3NGE1NDczN2QxYzc2ZWZhM2UxMzFkMDIyYjliMGI3YzdlYzg2ZjZhYjQ2YWY1ZTUyZGViNzViOWQ
https://join.slack.com/t/sharebookworkspace/shared_invite/zt-4fb3uu8m-VPrkhzdI9u3lsOlS1OkVvg

### 2.2 - LÁ NO SLACK, ENTRE NO CANAL #FRONTEND

Expand Down Expand Up @@ -45,7 +45,7 @@ Hora de colocar a mão na massa. A parte mais divertida, trabalhar no código-fo

Verifique a versão do Node - Recomendamos Versão 10.x.x
Versões recentes tem apresentado instabilidades com pacotes presente no projeto.
Use o Angular 7+
Use o Angular 9+

# Rodar o app pela primeira vez

Expand All @@ -69,9 +69,15 @@ docker-compose up -d --build
# Criando imagem e rodando o container com Backend LOCAL
docker-compose -f docker-compose-local.yml up -d --build

# Rodando os testes unitários
# Rodando todos os testes unitários
docker-compose run --rm sharebook npm run test

# Para rodar o teste unitário dentro do container e verificar os possíveis erros
docker exec -it sharebook-frontend-dev bash
npm run test-debug
acessar a URL que aparece no console: http://localhost:9876/
clicar no botão DEBUG

# Parando o container
docker-compose stop

Expand Down
25 changes: 21 additions & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/angular",
"index": "src/index.html",
"main": "src/main.ts",
Expand All @@ -23,12 +24,19 @@
"src/assets"
],
"styles": [
"src/custom-theme.scss",
"node_modules/ngx-toastr/toastr.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand All @@ -46,6 +54,12 @@
"buildOptimizer": true
},
"stage": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand All @@ -63,6 +77,12 @@
"buildOptimizer": true
},
"local": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand Down Expand Up @@ -99,9 +119,6 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"styles": [
"src/style.scss"
],
"scripts": [],
"assets": [
"src/favicon.ico",
Expand Down Expand Up @@ -152,4 +169,4 @@
}
},
"defaultProject": "angular"
}
}
File renamed without changes.
1 change: 1 addition & 0 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ services:
- '/app/node_modules'
ports:
- '4200:4200'
- '9876:9876'
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ services:
- '/app/node_modules'
ports:
- '4200:4200'
- '9876:9876'
3 changes: 2 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
/* global __dirname, require */

module.exports = function (config) {
config.set({
Expand All @@ -16,7 +17,7 @@ module.exports = function (config) {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/teste'),
dir: require('path').join(__dirname, './coverage'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true,
},
Expand Down
Loading

0 comments on commit 3720d44

Please sign in to comment.