diff --git a/.babelrc b/.babelrc index 900a7d4ad..fbd5b7451 100644 --- a/.babelrc +++ b/.babelrc @@ -1,11 +1,23 @@ { "presets": [ - ["env", { "modules": false }] + [ + "@babel/preset-env", + { + "modules": false + } + ] ], "env": { "test": { "presets": [ - ["env", { "targets": { "node": "current" }}] + [ + "@babel/preset-env", + { + "targets": { + "node": "10" + } + } + ] ] } } diff --git a/.dockerignore b/.dockerignore index cd8fd3390..b0980ccfc 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,6 @@ .vscode/ -styleguide/node_modules/ +styleguide/ node_modules/ npm-debug.log diff --git a/.gitignore b/.gitignore index 292c993d3..f8c980f7c 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ build/Release # Dependency directories node_modules/ +styleguide/ # TypeScript v1 declaration files typings/ @@ -79,6 +80,7 @@ static/uploads cypress/videos cypress/screenshots/ +cypress.env.json # Apple macOS folder attribute file .DS_Store diff --git a/.travis.yml b/.travis.yml index d17bd7cb8..2b1608b01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,27 +18,33 @@ before_install: - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose - chmod +x docker-compose - sudo mv docker-compose /usr/local/bin + - cp cypress.env.template.json cypress.env.json install: - docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT --target production -t humanconnection/nitro-web . - docker-compose -f docker-compose.yml -f docker-compose.travis.yml up -d - git clone https://github.com/Human-Connection/Nitro-Backend.git ../Nitro-Backend - git -C "../Nitro-Backend" checkout $BACKEND_BRANCH || git -C "../Nitro-Backend" checkout master - - docker-compose -f ../Nitro-Backend/docker-compose.yml -f ../Nitro-Backend/docker-compose.travis.yml up -d + - cd ../Nitro-Backend && yarn install && cd - + - docker-compose -f ../Nitro-Backend/docker-compose.yml -f ../Nitro-Backend/docker-compose.cypress.yml up -d - yarn global add cypress wait-on - yarn add cypress-cucumber-preprocessor script: - docker-compose exec -e NODE_ENV=test webapp yarn run lint - docker-compose exec -e NODE_ENV=test webapp yarn run test - - docker-compose -f ../Nitro-Backend/docker-compose.yml exec backend yarn run db:seed - - wait-on http://localhost:3000 - - cypress run --record --key $CYPRESS_TOKEN + - wait-on http://localhost:7474 && docker-compose -f ../Nitro-Backend/docker-compose.yml exec neo4j migrate + - wait-on http://localhost:3000 && cypress run --record --key $CYPRESS_TOKEN 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 + wget https://raw.githubusercontent.com/Human-Connection/Discord-Bot/develop/tester.sh && + chmod +x tester.sh && + ./tester.sh staging $WEBHOOK_URL; + fi after_failure: - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh diff --git a/Dockerfile b/Dockerfile index abbf2917b..7274693a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,9 +19,6 @@ COPY . . FROM base as build-and-test RUN cp .env.template .env RUN yarn install --production=false --frozen-lockfile --non-interactive -RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive \ - && cd .. \ - && yarn run styleguide:build RUN yarn run build FROM base as production diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 000000000..9d4508b38 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Human-Connection gGmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 3a563eff9..45f6e9010 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ -# Human Connection - NITRO Web -[](https://travis-ci.com/Human-Connection/Nitro-Web) +
+ +# NITRO Web +[](https://travis-ci.com/Human-Connection/Nitro-Web) +[](https://github.com/Human-Connection/Nitro-Web/blob/master/LICENSE.md) +[](https://app.fossa.io/projects/git%2Bgithub.com%2FHuman-Connection%2FNitro-Web?ref=badge_shield) +[](https://discord.gg/6ub73U3)  @@ -10,16 +17,15 @@ ### Install ``` bash # install all dependencies -$ cd styleguide && yarn install && cd .. -$ yarn styleguide:build $ yarn install ``` Copy: ``` cp .env.template .env +cp cypress.env.template.json cypress.env.json ``` -Configure the file `.env` according to your needs and your local setup. +Configure the files according to your needs and your local setup. ### Development ``` bash @@ -30,7 +36,6 @@ $ yarn dev ### Build for production ``` bash # build for production and launch server -$ yarn styleguide:build $ yarn build $ yarn start ``` @@ -41,10 +46,8 @@ All reusable Components (for example avatar) should be done inside the styleguid  -### To show the styleguide -``` bash -$ yarn styleguide -``` +More information can be found here: https://github.com/Human-Connection/Nitro-Styleguide + ## Internationalization (i18n) @@ -57,3 +60,6 @@ Thanks lokalise.co that we can use your premium account! ## Attributions + +## License +[](https://app.fossa.io/projects/git%2Bgithub.com%2FHuman-Connection%2FNitro-Web?ref=badge_large) diff --git a/assets/styles/main.scss b/assets/styles/main.scss index d22f3ec08..662b8bb0d 100644 --- a/assets/styles/main.scss +++ b/assets/styles/main.scss @@ -78,45 +78,6 @@ blockquote { } } -.hc-editor-content { - h1, - h2, - h3, - h4, - h5, - h6 { - &:not(:first-child) { - margin-top: 2rem; - } - } - p { - &:not(:last-child) { - margin-top: 0; - margin-bottom: 0; - } - } - dl, - ol, - ul, - blockquote, - pre, - table { - &:not(:first-child) { - margin-top: 15px; - } - } - *:first-child { - margin-top: 0; - } - *:last-child { - margin-bottom: 0; - } - // avoid double breaks - br + p { - margin-top: 0; - } -} - hr { border: 0; width: 100%; diff --git a/components/ContentMenu.vue b/components/ContentMenu.vue index 9ab85cb12..5e614c476 100644 --- a/components/ContentMenu.vue +++ b/components/ContentMenu.vue @@ -8,14 +8,19 @@ slot="default" slot-scope="{toggleMenu}" > -