merged master in
@ -15,11 +15,11 @@ RUN apk --no-cache add git
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
COPY styleguide/ ./styleguide
|
||||
RUN yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines
|
||||
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||
|
||||
# Install and build Styleguide
|
||||
COPY styleguide/ ./styleguide
|
||||
RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines \
|
||||
RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive \
|
||||
&& cd .. \
|
||||
&& yarn run styleguide:build \
|
||||
&& rm -Rf styleguide/node_modules
|
||||
|
||||
@ -7,11 +7,10 @@
|
||||
|
||||
### Install
|
||||
``` bash
|
||||
# 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 ..
|
||||
$ cd styleguide && yarn install && cd ..
|
||||
$ yarn run styleguide:build
|
||||
$ yarn install --ignore-engines
|
||||
$ yarn install
|
||||
```
|
||||
|
||||
### Development
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
const pkg = require('./package')
|
||||
const envWhitelist = ['NODE_ENV', 'BACKEND_URL', 'MAINTENANCE']
|
||||
const envWhitelist = ['NODE_ENV', 'MAINTENANCE']
|
||||
const dev = process.env.NODE_ENV !== 'production'
|
||||
|
||||
module.exports = {
|
||||
@ -100,16 +100,39 @@ module.exports = {
|
||||
** Nuxt.js modules
|
||||
*/
|
||||
modules: [
|
||||
'@nuxtjs/apollo',
|
||||
'@nuxtjs/axios',
|
||||
['@nuxtjs/dotenv', { only: envWhitelist }],
|
||||
['nuxt-env', { keys: envWhitelist }]
|
||||
['nuxt-env', { keys: envWhitelist }],
|
||||
'@nuxtjs/apollo',
|
||||
'@nuxtjs/axios'
|
||||
],
|
||||
|
||||
/*
|
||||
** Axios module configuration
|
||||
*/
|
||||
axios: {
|
||||
// See https://github.com/nuxt-community/axios-module#options
|
||||
debug: dev,
|
||||
proxy: true
|
||||
},
|
||||
proxy: {
|
||||
'/api': {
|
||||
// make this configurable (nuxt-dotenv)
|
||||
target: process.env.BACKEND_URL || 'http://localhost:4000',
|
||||
pathRewrite: { '^/api': '' },
|
||||
toProxy: true, // cloudflare needs that
|
||||
changeOrigin: true,
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'X-UI-Request': true,
|
||||
'X-API-TOKEN': process.env.BACKEND_TOKEN || 'NULL'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Give apollo module options
|
||||
apollo: {
|
||||
// tokenName: 'yourApolloTokenName', // optional, default: apollo-token
|
||||
tokenExpires: 1, // optional, default: 7 (days)
|
||||
tokenName: 'human-connection-token', // optional, default: apollo-token
|
||||
tokenExpires: 3, // optional, default: 7 (days)
|
||||
// includeNodeModules: true, // optional, default: false (this includes graphql-tag for node_modules folder)
|
||||
// optional
|
||||
errorHandler(error) {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
"generate": "nuxt generate",
|
||||
"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",
|
||||
"styleguide:build": "cd ./styleguide && yarn build:lib && cd ../ && yarn upgrade vue-cion-design-system",
|
||||
"test": "jest",
|
||||
"precommit": "yarn lint"
|
||||
},
|
||||
@ -33,12 +33,13 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxtjs/apollo": "^4.0.0-rc3",
|
||||
"@nuxtjs/axios": "^5.3.4",
|
||||
"@nuxtjs/axios": "^5.3.6",
|
||||
"@nuxtjs/dotenv": "^1.3.0",
|
||||
"accounting": "^0.4.1",
|
||||
"cross-env": "^5.2.0",
|
||||
"date-fns": "^2.0.0-alpha.24",
|
||||
"express": "^4.16.3",
|
||||
"graphql": "^14.0.2",
|
||||
"graphql-tag": "^2.10.0",
|
||||
"jsonwebtoken": "^8.3.0",
|
||||
"nuxt": "^2.0.0",
|
||||
@ -46,7 +47,7 @@
|
||||
"v-tooltip": "^2.0.0-rc.33",
|
||||
"vue-cion-design-system": "file:./styleguide",
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-izitoast": "^1.1.0"
|
||||
"vue-izitoast": "git://github.com/arthurvasconcelos/vue-izitoast.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/eslint-config-prettier": "^4.0.1",
|
||||
|
||||
@ -92,7 +92,7 @@ export default {
|
||||
try {
|
||||
await this.$store.dispatch('auth/login', { ...this.form })
|
||||
this.$toast.success('You are logged in!')
|
||||
this.$router.replace('/')
|
||||
this.$router.replace(this.$route.query.path || '/')
|
||||
} catch (err) {
|
||||
this.$toast.error(err.message)
|
||||
}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
export default function({ app }) {
|
||||
const backendUrl = app.$env.BACKEND_URL || 'http://localhost:4000'
|
||||
const backendUrl = process.BACKEND_URL || 'http://localhost:4000'
|
||||
return {
|
||||
httpEndpoint: backendUrl,
|
||||
httpEndpoint: process.server ? backendUrl : '/api',
|
||||
httpLinkOptions: {
|
||||
credentials: 'same-origin'
|
||||
},
|
||||
credentials: true,
|
||||
tokenName: 'apollo-token',
|
||||
tokenName: 'human-connection-token',
|
||||
persisting: false,
|
||||
websocketsOnly: false
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 50 KiB |
@ -23,7 +23,7 @@
|
||||
"@vue/cli-plugin-eslint": "^3.0.0-rc.12",
|
||||
"@vue/cli-plugin-unit-jest": "^3.0.1",
|
||||
"@vue/cli-service": "^3.0.0-rc.12",
|
||||
"@vue/eslint-config-prettier": "^3.0.0-rc.12",
|
||||
"@vue/eslint-config-prettier": "^4.0.1",
|
||||
"@vue/test-utils": "^1.0.0-beta.20",
|
||||
"async-validator": "^1.8.5",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
|
||||
|
Before Width: | Height: | Size: 335 KiB After Width: | Height: | Size: 298 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 90 KiB |