Skip to content

Commit

Permalink
Merge pull request #12 from Kalkuli/develop
Browse files Browse the repository at this point in the history
Solve 125 Criar Release do Projeto
  • Loading branch information
MarianaPicolo authored Oct 2, 2018
2 parents 86301ca + d579882 commit 12368ff
Show file tree
Hide file tree
Showing 71 changed files with 14,028 additions and 72 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

# testing
/coverage
__snapshots__/

# production
/build
Expand Down
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: node_js
node_js:
- "stable"
cache:
directories:
- node_modules
script:
- npm test
- CI=false npm run build
8 changes: 4 additions & 4 deletions Dockerfile → Dockerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
FROM node:10.1.0

# Set working directory
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
RUN mkdir /app
WORKDIR /app

# Copy project to app directory inside the image
COPY . /app
COPY package.json /usr/src/app/package.json
COPY package.json /app/package.json

# Install packages
RUN npm install --silent
RUN npm install

# Tell Docker about the port we'll run on.
EXPOSE 3000
Expand Down
38 changes: 30 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# Configurando o ambiente
Abaixo temos instruções de como configurar o ambiente de forma rápida.
# _Front-end_

<div style="text-align: center">

<a href="https://travis-ci.com/Kalkuli/2018.2-Kalkuli_Front-End"><img src="https://travis-ci.com/Kalkuli/2018.2-Kalkuli_Front-End.svg?branch=master" /></a>
<a href="https://codeclimate.com/github/Kalkuli/2018.2-Kalkuli_Front-End/test_coverage"><img src="https://api.codeclimate.com/v1/badges/2a9aa6cb147af153a8c7/test_coverage" /></a>
<a href="https://codeclimate.com/github/Kalkuli/2018.2-Kalkuli_Front-End/maintainability"><img src="https://api.codeclimate.com/v1/badges/2a9aa6cb147af153a8c7/maintainability" /></a>
<a href="https://opensource.org/licenses/GPL-3.0"><img src="https://img.shields.io/badge/license-GPL-%235DA8C1.svg"/></a>

</div>

<br>

# Configurando o ambiente
Abaixo temos instruções de como configurar o ambiente de forma rápida.


## Instalando Docker
## Instalando o _Docker_

#### 1. Desinstale versões antigas

Expand Down Expand Up @@ -54,7 +65,7 @@ e então
<br>


## Instalando Docker-Compose
## Instalando o _Docker-Compose_

#### 1. Baixe-o

Expand All @@ -73,17 +84,28 @@ e então
<br>

## Colocando no ar
Agora ficou fácil, basta apenas utilizar o usar o Docker Compose para colocar a aplicação no ar! Utilize os comando:
Agora ficou fácil, basta apenas utilizar o _Docker Compose_ para colocar a aplicação no ar! Utilize os comandos:

```docker-compose build```
```sudo docker-compose -f docker-compose-dev.yml build```

e

```docker-compose up```
```sudo docker-compose -f docker-compose-dev.yml up```

Acesse o servidor local no endereço apresentado abaixo:

http://localhost:3000/


Agora você já pode começar a contribuir!
Agora você já pode começar a contribuir!


## Testando

Para rodar os testes utilize:

```sudo docker-compose -f docker-compose-dev.yml run front-end npm test```

E para saber a cobertura de testes utilize:

```sudo docker-compose -f docker-compose-dev.yml run front-end npm test -- --coverage```
5 changes: 4 additions & 1 deletion config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ module.exports = {
// In production, we use a plugin to extract that CSS to a file, but
// in development "style" loader enables hot editing of CSS.
{
test: /\.css$/,
test: /\.scss$/,
use: [
require.resolve('style-loader'),
{
Expand Down Expand Up @@ -186,6 +186,9 @@ module.exports = {
],
},
},
{
loader: require.resolve('sass-loader'),
},
],
},
// "file" loader makes sure those assets get served by WebpackDevServer.
Expand Down
5 changes: 4 additions & 1 deletion config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ module.exports = {
// use the "style" loader inside the async code so CSS from them won't be
// in the main CSS file.
{
test: /\.css$/,
test: /\.scss$/,
loader: ExtractTextPlugin.extract(
Object.assign(
{
Expand Down Expand Up @@ -205,6 +205,9 @@ module.exports = {
],
},
},
{
loader: require.resolve('sass-loader'),
},
],
},
extractTextPluginOptions
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml → docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ services:
front-end:
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile-dev
ports:
- 3000:3000
volumes:
- '.:/usr/src/app'
- '/usr/src/app/node_modules'
- '.:/app'
- '/app/node_modules'
environment:
- NODE_ENV=development
Loading

0 comments on commit 12368ff

Please sign in to comment.