From 8399d2297951a06e1027a126d922257af9bd21de Mon Sep 17 00:00:00 2001 From: Michael Both Date: Thu, 22 Nov 2018 17:24:24 +0100 Subject: [PATCH 01/13] Fix vuep source --- styleguide/package.json | 2 +- styleguide/yarn.lock | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/styleguide/package.json b/styleguide/package.json index 6879fabaf..142a197ed 100644 --- a/styleguide/package.json +++ b/styleguide/package.json @@ -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": "^0.8.1", "webpack-bundle-analyzer": "^2.13.1", "webpack-merge-and-include-globally": "^2.0.11" }, diff --git a/styleguide/yarn.lock b/styleguide/yarn.lock index dcde904cd..70eae6a97 100644 --- a/styleguide/yarn.lock +++ b/styleguide/yarn.lock @@ -9460,9 +9460,10 @@ 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@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/vuep/-/vuep-0.8.1.tgz#949b455f375788fbd7d1c35ca495a0faa5d5502f" + integrity sha512-D4ClmdZ37Itb57KdW9FPqE5820ENAFuJFmc7KyzGfoGBDhVHYxgF/pUbeTjpGe4VF0u2lGQVItfZ1xlh9nMpWg== dependencies: simple-assign "^0.1.0" From 208751602a134619afe9bffa9f34c28f9c82845a Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Fri, 23 Nov 2018 10:00:34 +0100 Subject: [PATCH 02/13] fixed issue with styleguide --- styleguide/.prettierrc | 4 +++- styleguide/package.json | 2 +- yarn.lock | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/styleguide/.prettierrc b/styleguide/.prettierrc index b2095be81..7dc4f8263 100644 --- a/styleguide/.prettierrc +++ b/styleguide/.prettierrc @@ -1,4 +1,6 @@ { "semi": false, - "singleQuote": true + "singleQuote": true, + "tabWidth": 2, + "bracketSpacing": true } diff --git a/styleguide/package.json b/styleguide/package.json index 142a197ed..45e62edf7 100644 --- a/styleguide/package.json +++ b/styleguide/package.json @@ -56,7 +56,7 @@ "vue-router": "^3.0.1", "vue-svg-loader": "^0.8.0", "vue-template-compiler": "^2.5.17", - "vuep": "^0.8.1", + "vuep": "git://github.com/visualjerk/vuep.git#fix-iframe-firefox", "webpack-bundle-analyzer": "^2.13.1", "webpack-merge-and-include-globally": "^2.0.11" }, diff --git a/yarn.lock b/yarn.lock index 328b2d5fe..b7ee774c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9470,6 +9470,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" From a0634d3d87958fb48c3dffccd4f6ee28dffca10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Fri, 23 Nov 2018 13:40:01 +0100 Subject: [PATCH 03/13] Yarn install in styleguide/, fix container build --- styleguide/yarn.lock | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/styleguide/yarn.lock b/styleguide/yarn.lock index 70eae6a97..6d396a01c 100644 --- a/styleguide/yarn.lock +++ b/styleguide/yarn.lock @@ -9460,10 +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@^0.8.1: +"vuep@git://github.com/visualjerk/vuep.git#fix-iframe-firefox": version "0.8.1" - resolved "https://registry.yarnpkg.com/vuep/-/vuep-0.8.1.tgz#949b455f375788fbd7d1c35ca495a0faa5d5502f" - integrity sha512-D4ClmdZ37Itb57KdW9FPqE5820ENAFuJFmc7KyzGfoGBDhVHYxgF/pUbeTjpGe4VF0u2lGQVItfZ1xlh9nMpWg== + resolved "git://github.com/visualjerk/vuep.git#df765f9bce3d96f79ffc35e75ec2885539bf9baa" dependencies: simple-assign "^0.1.0" From 107a8ada143af14b13e714fd2ef87f13b3261829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Fri, 23 Nov 2018 14:06:12 +0100 Subject: [PATCH 04/13] Add missing styleguid:build and fix css import --- Dockerfile | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index d0d0e28dd..9cee1fa94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,7 @@ RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-int COPY package.json . COPY yarn.lock . +RUN yarn run styleguide:build RUN yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines COPY . . diff --git a/README.md b/README.md index 41ec07c5b..e57de2edd 100644 --- a/README.md +++ b/README.md @@ -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 ``` From 18697e30632960169c3b645bf2b2aa190247c57f Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Fri, 23 Nov 2018 15:56:40 +0100 Subject: [PATCH 05/13] adjust user relation after changing the author relation in the backend --- components/Author.vue | 2 +- graphql/UserProfileQuery.js | 8 +++--- nuxt.config.js | 13 +++++---- pages/index.vue | 24 ++++++++--------- pages/post/_slug/index.vue | 48 ++++++++++++++++------------------ pages/post/_slug/more-info.vue | 22 +++++++--------- 6 files changed, 53 insertions(+), 64 deletions(-) diff --git a/components/Author.vue b/components/Author.vue index 48236f8c9..f307bc19b 100644 --- a/components/Author.vue +++ b/components/Author.vue @@ -136,7 +136,7 @@ export default { }, author() { return this.hasAuthor - ? this.post.author.User + ? this.post.author : { name: 'Anonymus' } diff --git a/graphql/UserProfileQuery.js b/graphql/UserProfileQuery.js index 38646e386..e49233f5d 100644 --- a/graphql/UserProfileQuery.js +++ b/graphql/UserProfileQuery.js @@ -64,11 +64,9 @@ export default gql(` image createdAt author { - User { - id - avatar - name - } + id + avatar + name } } } diff --git a/nuxt.config.js b/nuxt.config.js index 59588a8ee..b763fa877 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -1,14 +1,13 @@ const pkg = require('./package') -const envWhitelist = [ - 'NODE_ENV', - 'BACKEND_URL', - 'MAINTENANCE' -] - +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' @@ -129,7 +128,7 @@ module.exports = { // }, // required clientConfigs: { - default: '~/plugins/apollo-config.js', + default: '~/plugins/apollo-config.js' } }, diff --git a/pages/index.vue b/pages/index.vue index e267c6121..0a68ff8e9 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -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 diff --git a/pages/post/_slug/index.vue b/pages/post/_slug/index.vue index 528be4fd4..9bd14f2a7 100644 --- a/pages/post/_slug/index.vue +++ b/pages/post/_slug/index.vue @@ -120,20 +120,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 { @@ -146,20 +144,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 } } } diff --git a/pages/post/_slug/more-info.vue b/pages/post/_slug/more-info.vue index 6c704a245..811e283de 100644 --- a/pages/post/_slug/more-info.vue +++ b/pages/post/_slug/more-info.vue @@ -79,19 +79,17 @@ export default { shoutedCount commentsCount author { - User { + id + name + slug + avatar + contributionsCount + followedByCount + commentsCount + badges { id - name - slug - avatar - contributionsCount - followedByCount - commentsCount - badges { - id - key - icon - } + key + icon } } } From 1d038070ca09d3df2cbd1c130068205b81256539 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Fri, 23 Nov 2018 16:16:37 +0100 Subject: [PATCH 06/13] Added travis configuration --- .travis.yml | 47 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 54a9b37c8..2c25fd2e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,48 @@ language: node_js node_js: - "10" - +services: + - docker cache: + yarn: true directories: - - "node_modules" + - node_modules +# install + # nothing -install: - - yarn install +jobs: + include: + - stage: Test and Build + script: + - cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines + - yarn run styleguide:build + - yarn install --frozen-lockfile --non-interactive --ignore-engines + # - yarn run ci + - script: + - docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/webapp . -script: - - yarn run test +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/webapp humanconnection/webapp:latest && + docker push humanconnection/webapp:latest && + wget https://raw.githubusercontent.com/Human-Connection/Discord-Bot/develop/tester.sh && + chmod +x tester.sh && + ./tester.sh nitro-alpha $WEBHOOK_URL; + fi +# - if [ $TRAVIS_BRANCH == "develop" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then +# docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" && +# docker tag humanconnection/webapp humanconnection/webapp:latest && +# docker push humanconnection/webapp:latest && +# wget https://raw.githubusercontent.com/Human-Connection/Discord-Bot/develop/tester.sh && +# chmod +x tester.sh && +# ./tester.sh nitro-staging $WEBHOOK_URL; +# 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 From ef2ce82e74f56d347c7d670305af435fdf5e6647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Fri, 23 Nov 2018 17:39:59 +0100 Subject: [PATCH 07/13] Run commands from within docker container + Remove broken notification script --- .travis.yml | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2c25fd2e7..3a546b5f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,16 +10,11 @@ cache: # install # nothing -jobs: - include: - - stage: Test and Build - script: - - cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines - - yarn run styleguide:build - - yarn install --frozen-lockfile --non-interactive --ignore-engines - # - yarn run ci - - script: - - docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/webapp . +before_script: + - docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/webapp . + +script: + - docker run humanconnection/webapp yarn run lint after_success: - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh @@ -28,19 +23,8 @@ after_success: - if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" && docker tag humanconnection/webapp humanconnection/webapp:latest && - docker push humanconnection/webapp:latest && - wget https://raw.githubusercontent.com/Human-Connection/Discord-Bot/develop/tester.sh && - chmod +x tester.sh && - ./tester.sh nitro-alpha $WEBHOOK_URL; + docker push humanconnection/webapp:latest fi -# - if [ $TRAVIS_BRANCH == "develop" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then -# docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" && -# docker tag humanconnection/webapp humanconnection/webapp:latest && -# docker push humanconnection/webapp:latest && -# wget https://raw.githubusercontent.com/Human-Connection/Discord-Bot/develop/tester.sh && -# chmod +x tester.sh && -# ./tester.sh nitro-staging $WEBHOOK_URL; -# fi after_failure: - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh From f33c988ba242c33ae3514ba361afd408e1104df8 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Sat, 24 Nov 2018 12:10:55 +0100 Subject: [PATCH 08/13] unified travis.yml and prefixed docker image --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3a546b5f8..23985fa14 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,19 +11,19 @@ cache: # nothing before_script: - - docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/webapp . + - docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/nitro-webapp . script: - - docker run humanconnection/webapp yarn run lint + - docker run humanconnection/nitro-webapp 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/webapp humanconnection/webapp:latest && - docker push humanconnection/webapp:latest + docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"; + docker tag humanconnection/nitro-webapp humanconnection/nitro-webapp:latest; + docker push humanconnection/nitro-webapp:latest; fi after_failure: From 7a9d2823cc513fb9e4684eb5323369bfc89a8248 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Sat, 24 Nov 2018 12:38:42 +0100 Subject: [PATCH 09/13] updated travis build --- .travis.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 23985fa14..8eea15380 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,23 +7,21 @@ cache: yarn: true directories: - node_modules -# install - # nothing before_script: - - docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/nitro-webapp . + - docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/nitro-web . script: - - docker run humanconnection/nitro-webapp yarn run lint + - 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 + # - 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-webapp humanconnection/nitro-webapp:latest; - docker push humanconnection/nitro-webapp:latest; + docker tag humanconnection/nitro-web humanconnection/nitro-web:latest; + docker push humanconnection/nitro-web:latest; fi after_failure: From 50ccccd2b5c38d91312ba6105f852d591d738c7e Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Sat, 24 Nov 2018 12:58:18 +0100 Subject: [PATCH 10/13] improved docker file --- Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9cee1fa94..8399f0c34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,27 @@ 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 +# Install Styleguide COPY styleguide/ ./styleguide RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines COPY package.json . COPY yarn.lock . + +# Build Styleguide RUN yarn run styleguide:build + +# Install Web Application RUN yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines COPY . . From dadd62ed8791709ce3152ea1d968bacfd25cc922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Sat, 24 Nov 2018 14:27:02 +0100 Subject: [PATCH 11/13] Update .travis.yml, try install instead of before_script Co-Authored-By: appinteractive --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8eea15380..da827f262 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ cache: directories: - node_modules -before_script: +install: - docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/nitro-web . script: From ab658812394634155f66a83433b3aa1c77d6e549 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Sun, 25 Nov 2018 14:14:15 +0100 Subject: [PATCH 12/13] fixed linting --- .eslintignore | 1 + components/Badges.spec.js | 3 +-- package.json | 3 ++- yarn.lock | 23 ++++++++++++++++++++++- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.eslintignore b/.eslintignore index 181955808..69d9ce171 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,4 @@ node_modules build .nuxt cypress/ +styleguide/ diff --git a/components/Badges.spec.js b/components/Badges.spec.js index 711cb89da..5273fca21 100644 --- a/components/Badges.spec.js +++ b/components/Badges.spec.js @@ -5,8 +5,7 @@ describe('Badges.vue', () => { let wrapper beforeEach(() => { - wrapper = shallowMount(Badges, { - }) + wrapper = shallowMount(Badges, {}) }) it('renders', () => { diff --git a/package.json b/package.json index 0729b1aae..c33c4ec8a 100644 --- a/package.json +++ b/package.json @@ -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", @@ -48,6 +48,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", diff --git a/yarn.lock b/yarn.lock index b7ee774c4..8b38d028a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -900,6 +900,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" @@ -3621,6 +3630,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" @@ -3631,7 +3647,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: @@ -7578,6 +7594,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" From 088336dd2a3b816c9a19ec45b89663a9852e5665 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Mon, 26 Nov 2018 10:08:48 +0100 Subject: [PATCH 13/13] try to improve build process and remove styleguide node modules after build --- Dockerfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8399f0c34..7ababd203 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,19 +11,19 @@ WORKDIR $WORKDIR # See: https://github.com/nodejs/docker-node/pull/367#issuecomment-430807898 RUN apk --no-cache add git -# Install Styleguide -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 . - -# Build Styleguide -RUN yarn run styleguide:build - -# Install Web Application +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"]