merge master in

This commit is contained in:
Grzegorz Leoniec 2018-11-26 12:32:01 +01:00
commit a71fefd599
16 changed files with 119 additions and 76 deletions

View File

@ -2,3 +2,4 @@ node_modules
build
.nuxt
cypress/
styleguide/

View File

@ -1,13 +1,30 @@
language: node_js
node_js:
- "10"
services:
- docker
cache:
yarn: true
directories:
- "node_modules"
- node_modules
install:
- yarn install
- docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/nitro-web .
script:
- yarn run test
- docker run humanconnection/nitro-web yarn run lint
after_success:
# - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
# - chmod +x send.sh
# - ./send.sh success $WEBHOOK_URL
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
docker tag humanconnection/nitro-web humanconnection/nitro-web:latest;
docker push humanconnection/nitro-web:latest;
fi
after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL

View File

@ -1,23 +1,29 @@
FROM node:10-alpine
LABEL Description="This image builds and runs the Human-Connection Web Application Frontend" Vendor="Human-Connection gGmbH" Version="0.0.1" Maintainer="Human-Connection gGmbH (developer@human-connection.org)"
LABEL Description="Web Frontend of the Social Network Human-Connection.org" Vendor="Human-Connection gGmbH" Version="0.0.1" Maintainer="Human-Connection gGmbH (developer@human-connection.org)"
# expose the app port
# Expose the app port
EXPOSE 3000
ARG WORKDIR=/HC-WebApp
ARG WORKDIR=/nitro-web
RUN mkdir -p $WORKDIR
WORKDIR $WORKDIR
# See: https://github.com/nodejs/docker-node/pull/367#issuecomment-430807898
RUN apk --no-cache add git
COPY styleguide/ ./styleguide
RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines
# Install Web Application
COPY package.json .
COPY yarn.lock .
COPY styleguide/ ./styleguide
RUN yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines
# Install and build Styleguide
COPY styleguide/ ./styleguide
RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines \
&& cd .. \
&& yarn run styleguide:build \
&& rm -Rf styleguide/node_modules
COPY . .
RUN ["yarn", "run", "build"]
CMD ["yarn", "run", "start"]

View File

@ -10,6 +10,7 @@
# NOTE: currently we need the --ignore-engines parameter as one package is an idiot and dont like new node versions
# install all dependencies
$ cd styleguide && yarn install --ignore-engines && cd ..
$ yarn run styleguide:build
$ yarn install --ignore-engines
```

View File

@ -136,7 +136,7 @@ export default {
},
author() {
return this.hasAuthor
? this.post.author.User
? this.post.author
: {
name: 'Anonymus'
}

View File

@ -5,8 +5,7 @@ describe('Badges.vue', () => {
let wrapper
beforeEach(() => {
wrapper = shallowMount(Badges, {
})
wrapper = shallowMount(Badges, {})
})
it('renders', () => {

View File

@ -66,11 +66,9 @@ export default gql(`
icon
}
author {
User {
id
avatar
name
}
id
avatar
name
}
}
}

View File

@ -1,9 +1,13 @@
const pkg = require('./package')
const envWhitelist = ['NODE_ENV', 'BACKEND_URL', 'MAINTENANCE']
const dev = process.env.NODE_ENV !== 'production'
module.exports = {
mode: 'universal',
dev: dev,
debug: dev ? 'nuxt:*,app' : null,
transition: {
name: 'slide-up',
mode: 'out-in'

View File

@ -9,7 +9,7 @@
"build": "nuxt build",
"start": "cross-env node server/index.js",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"lint": "eslint --ext .js,.vue .",
"styleguide": "cd ./styleguide && yarn dev",
"styleguide:build": "cd ./styleguide && yarn build:lib && cd ../ && yarn upgrade vue-cion-design-system --ignore-engines",
"test": "jest",
@ -49,6 +49,7 @@
"vue-izitoast": "^1.1.0"
},
"devDependencies": {
"@vue/eslint-config-prettier": "^4.0.1",
"@vue/test-utils": "^1.0.0-beta.25",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",

View File

@ -86,20 +86,18 @@ export default {
slug
image
author {
User {
id
avatar
slug
name
contributionsCount
shoutedCount
commentsCount
followedByCount
badges {
id
avatar
slug
name
contributionsCount
shoutedCount
commentsCount
followedByCount
badges {
id
key
icon
}
key
icon
}
}
commentsCount

View File

@ -127,20 +127,18 @@ export default {
slug
image
author {
User {
id
slug
name
avatar
shoutedCount
contributionsCount
commentsCount
followedByCount
badges {
id
slug
name
avatar
shoutedCount
contributionsCount
commentsCount
followedByCount
badges {
id
key
icon
}
key
icon
}
}
tags {
@ -153,20 +151,18 @@ export default {
createdAt
deleted
author {
User {
id
slug
name
avatar
shoutedCount
contributionsCount
commentsCount
followedByCount
badges {
id
slug
name
avatar
shoutedCount
contributionsCount
commentsCount
followedByCount
badges {
id
key
icon
}
key
icon
}
}
}

View File

@ -91,19 +91,17 @@ export default {
icon
}
author {
User {
id
name
slug
avatar
contributionsCount
followedByCount
commentsCount
badges {
id
name
slug
avatar
contributionsCount
followedByCount
commentsCount
badges {
id
key
icon
}
key
icon
}
}
}

View File

@ -1,4 +1,6 @@
{
"semi": false,
"singleQuote": true
"singleQuote": true,
"tabWidth": 2,
"bracketSpacing": true
}

View File

@ -56,7 +56,7 @@
"vue-router": "^3.0.1",
"vue-svg-loader": "^0.8.0",
"vue-template-compiler": "^2.5.17",
"vuep": "git://github.com/visualjerk/vuep.git#iframe-preview",
"vuep": "git://github.com/visualjerk/vuep.git#fix-iframe-firefox",
"webpack-bundle-analyzer": "^2.13.1",
"webpack-merge-and-include-globally": "^2.0.11"
},

View File

@ -9460,9 +9460,9 @@ vue@^2.4.2, vue@^2.5.17:
version "2.5.17"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.17.tgz#0f8789ad718be68ca1872629832ed533589c6ada"
"vuep@git://github.com/visualjerk/vuep.git#iframe-preview":
version "0.8.0"
resolved "git://github.com/visualjerk/vuep.git#98a05b94f54dc30432a8d0ac2da0c0cadd74dae7"
"vuep@git://github.com/visualjerk/vuep.git#fix-iframe-firefox":
version "0.8.1"
resolved "git://github.com/visualjerk/vuep.git#df765f9bce3d96f79ffc35e75ec2885539bf9baa"
dependencies:
simple-assign "^0.1.0"

View File

@ -916,6 +916,15 @@
source-map "^0.5.6"
vue-template-es2015-compiler "^1.6.0"
"@vue/eslint-config-prettier@^4.0.1":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@vue/eslint-config-prettier/-/eslint-config-prettier-4.0.1.tgz#a036d0d2193c5c836542b35a3a7c35c4e1c68c97"
integrity sha512-rJEDXPb61Hfgg8GllO3XXFP98bcIxdNNHSrNcxP/vBSukOolgOwQyZJ5f5z/c7ViPyh5/IDlC4qBnhx/0n+I4g==
dependencies:
eslint-config-prettier "^3.3.0"
eslint-plugin-prettier "^3.0.0"
prettier "^1.15.2"
"@vue/test-utils@^1.0.0-beta.25":
version "1.0.0-beta.25"
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.0.0-beta.25.tgz#4703076de3076bac42cdd242cd53e6fb8752ed8c"
@ -3665,6 +3674,13 @@ eslint-config-prettier@^3.1.0:
dependencies:
get-stdin "^6.0.0"
eslint-config-prettier@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-3.3.0.tgz#41afc8d3b852e757f06274ed6c44ca16f939a57d"
integrity sha512-Bc3bh5bAcKNvs3HOpSi6EfGA2IIp7EzWcg2tS4vP7stnXu/J1opihHDM7jI9JCIckyIDTgZLSWn7J3HY0j2JfA==
dependencies:
get-stdin "^6.0.0"
eslint-loader@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-2.1.1.tgz#2a9251523652430bfdd643efdb0afc1a2a89546a"
@ -3675,7 +3691,7 @@ eslint-loader@^2.0.0:
object-hash "^1.1.4"
rimraf "^2.6.1"
eslint-plugin-prettier@3.0.0:
eslint-plugin-prettier@3.0.0, eslint-plugin-prettier@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.0.0.tgz#f6b823e065f8c36529918cdb766d7a0e975ec30c"
dependencies:
@ -7645,6 +7661,11 @@ prettier@1.14.3:
version "1.14.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895"
prettier@^1.15.2:
version "1.15.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.2.tgz#d31abe22afa4351efa14c7f8b94b58bb7452205e"
integrity sha512-YgPLFFA0CdKL4Eg2IHtUSjzj/BWgszDHiNQAe0VAIBse34148whfdzLagRL+QiKS+YfK5ftB6X4v/MBw8yCoug==
pretty-error@^2.0.2:
version "2.1.1"
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"
@ -9541,6 +9562,7 @@ vue-template-es2015-compiler@^1.6.0:
vue@^2.5.17:
version "2.5.17"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.17.tgz#0f8789ad718be68ca1872629832ed533589c6ada"
integrity sha512-mFbcWoDIJi0w0Za4emyLiW72Jae0yjANHbCVquMKijcavBGypqlF7zHRgMa5k4sesdv7hv2rB4JPdZfR+TPfhQ==
vuex@^3.0.1:
version "3.0.1"