mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
feat(webapp): bind local styleguide & fix maintenance page (#8933)
This commit is contained in:
parent
ace5e9a89e
commit
b06b29b858
1
.github/file-filters.yml
vendored
1
.github/file-filters.yml
vendored
@ -12,6 +12,7 @@ docker: &docker
|
|||||||
webapp: &webapp
|
webapp: &webapp
|
||||||
- '.github/workflows/test-webapp.yml'
|
- '.github/workflows/test-webapp.yml'
|
||||||
- 'webapp/**/*'
|
- 'webapp/**/*'
|
||||||
|
- 'styleguide/**/*'
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
|
|
||||||
docs-check: &docs-check
|
docs-check: &docs-check
|
||||||
|
|||||||
12
.github/workflows/docker-push.yml
vendored
12
.github/workflows/docker-push.yml
vendored
@ -24,27 +24,27 @@ jobs:
|
|||||||
file: backend/Dockerfile
|
file: backend/Dockerfile
|
||||||
target: production
|
target: production
|
||||||
- name: webapp-base
|
- name: webapp-base
|
||||||
context: webapp
|
context: .
|
||||||
file: webapp/Dockerfile
|
file: webapp/Dockerfile
|
||||||
target: base
|
target: base
|
||||||
- name: webapp-build
|
- name: webapp-build
|
||||||
context: webapp
|
context: .
|
||||||
file: webapp/Dockerfile
|
file: webapp/Dockerfile
|
||||||
target: build
|
target: build
|
||||||
- name: webapp
|
- name: webapp
|
||||||
context: webapp
|
context: .
|
||||||
file: webapp/Dockerfile
|
file: webapp/Dockerfile
|
||||||
target: production
|
target: production
|
||||||
- name: maintenance-base
|
- name: maintenance-base
|
||||||
context: webapp
|
context: .
|
||||||
file: webapp/Dockerfile.maintenance
|
file: webapp/Dockerfile.maintenance
|
||||||
target: base
|
target: base
|
||||||
- name: maintenance-build
|
- name: maintenance-build
|
||||||
context: webapp
|
context: .
|
||||||
file: webapp/Dockerfile.maintenance
|
file: webapp/Dockerfile.maintenance
|
||||||
target: build
|
target: build
|
||||||
- name: maintenance
|
- name: maintenance
|
||||||
context: webapp
|
context: .
|
||||||
file: webapp/Dockerfile.maintenance
|
file: webapp/Dockerfile.maintenance
|
||||||
target: production
|
target: production
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
2
.github/workflows/test-webapp.yml
vendored
2
.github/workflows/test-webapp.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Webapp | Build 'test' image
|
- name: Webapp | Build 'test' image
|
||||||
run: |
|
run: |
|
||||||
docker build --target test -t "ocelotsocialnetwork/webapp:test" webapp/
|
docker build --target test -f webapp/Dockerfile -t "ocelotsocialnetwork/webapp:test" .
|
||||||
docker save "ocelotsocialnetwork/webapp:test" > /tmp/webapp.tar
|
docker save "ocelotsocialnetwork/webapp:test" > /tmp/webapp.tar
|
||||||
|
|
||||||
- name: Cache docker image
|
- name: Cache docker image
|
||||||
|
|||||||
@ -4,7 +4,7 @@ services:
|
|||||||
image: ghcr.io/ocelot-social-community/ocelot-social/webapp-build:${OCELOT_VERSION:-latest}
|
image: ghcr.io/ocelot-social-community/ocelot-social/webapp-build:${OCELOT_VERSION:-latest}
|
||||||
build:
|
build:
|
||||||
target: build
|
target: build
|
||||||
context: webapp
|
context: .
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image: ghcr.io/ocelot-social-community/ocelot-social/backend-build:${OCELOT_VERSION:-latest}
|
image: ghcr.io/ocelot-social-community/ocelot-social/backend-build:${OCELOT_VERSION:-latest}
|
||||||
@ -16,5 +16,5 @@ services:
|
|||||||
image: ghcr.io/ocelot-social-community/ocelot-social/maintenance-build:${OCELOT_VERSION:-latest}
|
image: ghcr.io/ocelot-social-community/ocelot-social/maintenance-build:${OCELOT_VERSION:-latest}
|
||||||
build:
|
build:
|
||||||
target: build
|
target: build
|
||||||
context: webapp
|
context: .
|
||||||
dockerfile: ./Dockerfile.maintenance
|
dockerfile: ./Dockerfile.maintenance
|
||||||
|
|||||||
@ -7,7 +7,8 @@ services:
|
|||||||
webapp:
|
webapp:
|
||||||
image: ghcr.io/ocelot-social-community/ocelot-social/webapp:${OCELOT_VERSION:-latest}
|
image: ghcr.io/ocelot-social-community/ocelot-social/webapp:${OCELOT_VERSION:-latest}
|
||||||
build:
|
build:
|
||||||
context: ./webapp
|
context: .
|
||||||
|
dockerfile: ./webapp/Dockerfile
|
||||||
target: production
|
target: production
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
@ -50,8 +51,8 @@ services:
|
|||||||
maintenance:
|
maintenance:
|
||||||
image: ghcr.io/ocelot-social-community/ocelot-social/maintenance:${OCELOT_VERSION:-latest}
|
image: ghcr.io/ocelot-social-community/ocelot-social/maintenance:${OCELOT_VERSION:-latest}
|
||||||
build:
|
build:
|
||||||
context: ./webapp
|
context: .
|
||||||
dockerfile: Dockerfile.maintenance
|
dockerfile: ./webapp/Dockerfile.maintenance
|
||||||
ports:
|
ports:
|
||||||
- 3001:80
|
- 3001:80
|
||||||
|
|
||||||
|
|||||||
1
styleguide/.gitignore
vendored
1
styleguide/.gitignore
vendored
@ -1,6 +1,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
docs
|
docs
|
||||||
|
dist
|
||||||
|
|
||||||
# local env files
|
# local env files
|
||||||
.env.local
|
.env.local
|
||||||
|
|||||||
@ -4,11 +4,11 @@
|
|||||||
"private": false,
|
"private": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "http-server ./docs -o -s",
|
"serve": "http-server ./docs -o -s",
|
||||||
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider yarn theo && vue-cli-service build --no-fix",
|
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider yarn theo && cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build --no-fix",
|
||||||
"lint": "vue-cli-service lint --no-fix-warning",
|
"lint": "vue-cli-service lint --no-fix-warning",
|
||||||
"dev": "npm-run-all --parallel theo:onchange theo servedev",
|
"dev": "npm-run-all --parallel theo:onchange theo servedev",
|
||||||
"servedev": "vue-cli-service serve --open --no-fix",
|
"servedev": "vue-cli-service serve --open --no-fix",
|
||||||
"build:lib": "yarn theo && cross-env BUILD=library vue-cli-service build --target lib --name system ./src/library.js --no-fix",
|
"build:lib": "cross-env NODE_OPTIONS=--openssl-legacy-provider yarn theo && cross-env BUILD=library NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build --target lib --name system ./src/library.js --no-fix",
|
||||||
"theo": "theo ./src/system/tokens/tokens.yml --transform web --format map.scss,scss,raw.json,json --dest ./src/system/tokens/generated",
|
"theo": "theo ./src/system/tokens/tokens.yml --transform web --format map.scss,scss,raw.json,json --dest ./src/system/tokens/generated",
|
||||||
"theo:onchange": "onchange \"./src/system/tokens/*.yml\" -- npm run theo",
|
"theo:onchange": "onchange \"./src/system/tokens/*.yml\" -- npm run theo",
|
||||||
"test": "echo 'TODO: FIX & ADD TESTING!'",
|
"test": "echo 'TODO: FIX & ADD TESTING!'",
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getSpace } from '@@/utils'
|
import { getSpace } from '@@/utils'
|
||||||
import { mediaQuery } from '@@/mixins'
|
import { mediaQuery } from '../../../mixins'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used in combination with the flex item component to create flexible layouts.
|
* Used in combination with the flex item component to create flexible layouts.
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getSpace } from '@@/utils'
|
import { getSpace } from '@@/utils'
|
||||||
import { mediaQuery } from '@@/mixins'
|
import { mediaQuery } from '../../../mixins'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getSpace } from '@@/utils'
|
import { getSpace } from '@@/utils'
|
||||||
import { mediaQuery } from '@@/mixins'
|
import { mediaQuery } from '../../../mixins'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this component for grouping and separation.
|
* Use this component for grouping and separation.
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
styleguide/
|
|
||||||
node_modules/
|
node_modules/
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
.nuxt
|
.nuxt
|
||||||
styleguide/
|
|
||||||
**/*.min.js
|
**/*.min.js
|
||||||
static/sw.js
|
static/sw.js
|
||||||
|
|||||||
1
webapp/.gitignore
vendored
1
webapp/.gitignore
vendored
@ -30,7 +30,6 @@ build/Release
|
|||||||
|
|
||||||
# Dependency directories
|
# Dependency directories
|
||||||
node_modules/
|
node_modules/
|
||||||
styleguide/
|
|
||||||
|
|
||||||
# TypeScript v1 declaration files
|
# TypeScript v1 declaration files
|
||||||
typings/
|
typings/
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
FROM node:24.9.0-alpine AS styleguide
|
||||||
|
RUN apk --no-cache add git python3 make g++
|
||||||
|
RUN mkdir -p /app
|
||||||
|
WORKDIR /app
|
||||||
|
COPY styleguide .
|
||||||
|
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||||
|
RUN yarn run build:lib
|
||||||
|
|
||||||
FROM node:20.12.1-alpine AS base
|
FROM node:20.12.1-alpine AS base
|
||||||
LABEL org.label-schema.name="ocelot.social:webapp"
|
LABEL org.label-schema.name="ocelot.social:webapp"
|
||||||
LABEL org.label-schema.description="Web Frontend of the Social Network Software ocelot.social"
|
LABEL org.label-schema.description="Web Frontend of the Social Network Software ocelot.social"
|
||||||
@ -13,14 +21,15 @@ EXPOSE ${PORT}
|
|||||||
RUN apk --no-cache add git python3 make g++ bash jq
|
RUN apk --no-cache add git python3 make g++ bash jq
|
||||||
RUN mkdir -p /app
|
RUN mkdir -p /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
COPY --from=styleguide ./app/ /styleguide/
|
||||||
CMD ["/bin/bash", "-c", "yarn run start"]
|
CMD ["/bin/bash", "-c", "yarn run start"]
|
||||||
|
|
||||||
FROM base AS development
|
FROM base AS development
|
||||||
CMD ["/bin/bash", "-c", "yarn install && yarn run dev"]
|
CMD ["/bin/bash", "-c", "yarn install && yarn run dev"]
|
||||||
|
|
||||||
FROM base AS build
|
FROM base AS build
|
||||||
COPY . .
|
COPY webapp/ .
|
||||||
ONBUILD COPY ./branding .
|
ONBUILD COPY webapp/branding .
|
||||||
ONBUILD RUN tools/merge-locales.sh
|
ONBUILD RUN tools/merge-locales.sh
|
||||||
ONBUILD RUN yarn install --production=false --frozen-lockfile --non-interactive
|
ONBUILD RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||||
ONBUILD RUN yarn run build
|
ONBUILD RUN yarn run build
|
||||||
@ -39,7 +48,7 @@ ONBUILD RUN cd /build && yarn install --production=true --frozen-lockfile --non-
|
|||||||
|
|
||||||
FROM base AS test_build
|
FROM base AS test_build
|
||||||
ENV NODE_ENV=test
|
ENV NODE_ENV=test
|
||||||
COPY . .
|
COPY webapp/. .
|
||||||
RUN tools/merge-locales.sh
|
RUN tools/merge-locales.sh
|
||||||
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||||
RUN yarn run build
|
RUN yarn run build
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FROM nginx:alpine AS base
|
FROM nginx:1.29.1-alpine AS base
|
||||||
LABEL org.label-schema.name="ocelot.social:maintenance"
|
LABEL org.label-schema.name="ocelot.social:maintenance"
|
||||||
LABEL org.label-schema.description="Maintenance page of the Social Network Software ocelot.social"
|
LABEL org.label-schema.description="Maintenance page of the Social Network Software ocelot.social"
|
||||||
LABEL org.label-schema.usage="https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/README.md"
|
LABEL org.label-schema.usage="https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/README.md"
|
||||||
@ -8,27 +8,24 @@ LABEL org.label-schema.vendor="ocelot.social Community"
|
|||||||
LABEL org.label-schema.schema-version="1.0"
|
LABEL org.label-schema.schema-version="1.0"
|
||||||
LABEL maintainer="devops@ocelot.social"
|
LABEL maintainer="devops@ocelot.social"
|
||||||
|
|
||||||
|
FROM node:24.9.0-alpine AS styleguide
|
||||||
|
RUN apk --no-cache add git python3 make g++
|
||||||
|
RUN mkdir -p /app
|
||||||
|
WORKDIR /app
|
||||||
|
COPY styleguide .
|
||||||
|
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||||
|
RUN yarn run build:lib
|
||||||
|
|
||||||
FROM node:20.12.1-alpine AS build
|
FROM node:20.12.1-alpine AS build
|
||||||
ENV NODE_ENV="production"
|
ENV NODE_ENV="production"
|
||||||
RUN apk --no-cache add git python3 make g++ bash jq
|
RUN apk --no-cache add git python3 make g++ bash jq
|
||||||
|
COPY --from=styleguide ./app/ /styleguide/
|
||||||
RUN mkdir -p /app
|
RUN mkdir -p /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY assets assets
|
COPY webapp/ .
|
||||||
COPY components/LocaleSwitch/ components/LocaleSwitch
|
# Delete all Pages
|
||||||
COPY components/Dropdown.vue components/Dropdown.vue
|
RUN rm -rf ./pages
|
||||||
COPY layouts/blank.vue layouts/blank.vue
|
ONBUILD COPY webapp/branding .
|
||||||
COPY locales locales
|
|
||||||
COPY mixins mixins
|
|
||||||
COPY plugins/i18n.js plugins/v-tooltip.js plugins/styleguide.js plugins/
|
|
||||||
COPY static static
|
|
||||||
COPY constants constants
|
|
||||||
COPY nuxt.config.js nuxt.config.js
|
|
||||||
COPY config/ config/
|
|
||||||
COPY tools/ tools/
|
|
||||||
COPY maintenance/nginx maintenance/nginx
|
|
||||||
COPY maintenance/source maintenance/source
|
|
||||||
COPY package.json yarn.lock ./
|
|
||||||
ONBUILD COPY ./branding .
|
|
||||||
ONBUILD RUN tools/merge-locales.sh
|
ONBUILD RUN tools/merge-locales.sh
|
||||||
ONBUILD RUN yarn install --production=false --frozen-lockfile --non-interactive
|
ONBUILD RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||||
ONBUILD RUN cp -r maintenance/source/* ./
|
ONBUILD RUN cp -r maintenance/source/* ./
|
||||||
|
|||||||
@ -354,11 +354,11 @@ $z-index-surface: 1;
|
|||||||
* @tokens Media Query
|
* @tokens Media Query
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$media-query-x-small: (min-width: 480px);
|
$media-query-x-small: "(min-width: 480px)";
|
||||||
$media-query-small: (min-width: 600px);
|
$media-query-small: "(min-width: 600px)";
|
||||||
$media-query-medium: (min-width: 768px);
|
$media-query-medium: "(min-width: 768px)";
|
||||||
$media-query-large: (min-width: 1024px);
|
$media-query-large: "(min-width: 1024px)";
|
||||||
$media-query-x-large: (min-width: 1200px);
|
$media-query-x-large: "(min-width: 1200px)";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @tokens Background Images
|
* @tokens Background Images
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount, createLocalVue } from '@vue/test-utils'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import VTooltip from 'v-tooltip'
|
import VTooltip from 'v-tooltip'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
import Styleguide from '@@/'
|
||||||
import ContentMenu from './ContentMenu.vue'
|
import ContentMenu from './ContentMenu.vue'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = createLocalVue()
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import LoginForm from './LoginForm.vue'
|
import LoginForm from './LoginForm.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
import Styleguide from '@@/'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount, createLocalVue } from '@vue/test-utils'
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,6 @@ const environment = {
|
|||||||
DEBUG: process.env.NODE_ENV !== 'production' || false,
|
DEBUG: process.env.NODE_ENV !== 'production' || false,
|
||||||
PRODUCTION: process.env.NODE_ENV === 'production' || false,
|
PRODUCTION: process.env.NODE_ENV === 'production' || false,
|
||||||
NUXT_BUILD: process.env.NUXT_BUILD || '.nuxt',
|
NUXT_BUILD: process.env.NUXT_BUILD || '.nuxt',
|
||||||
STYLEGUIDE_DEV: process.env.STYLEGUIDE_DEV || false,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const server = {
|
const server = {
|
||||||
|
|||||||
@ -34,6 +34,8 @@ module.exports = {
|
|||||||
'@mapbox/mapbox-gl-geocoder': 'identity-obj-proxy',
|
'@mapbox/mapbox-gl-geocoder': 'identity-obj-proxy',
|
||||||
'vue2-datepicker/locale/undefined': 'vue2-datepicker/locale/en',
|
'vue2-datepicker/locale/undefined': 'vue2-datepicker/locale/en',
|
||||||
'^@/(.*)$': '<rootDir>/src/$1',
|
'^@/(.*)$': '<rootDir>/src/$1',
|
||||||
|
// jest is unable to build the styleguide on its own, as it uses webpack.
|
||||||
|
'^@@/': '<rootDir>/../styleguide/dist/system.umd.min.js',
|
||||||
'^~/(.*)$': '<rootDir>/$1',
|
'^~/(.*)$': '<rootDir>/$1',
|
||||||
},
|
},
|
||||||
moduleFileExtensions: ['js', 'json', 'vue'],
|
moduleFileExtensions: ['js', 'json', 'vue'],
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
"*"
|
"*"
|
||||||
],
|
],
|
||||||
"@@/*": [
|
"@@/*": [
|
||||||
"./*"
|
"../styleguide/src/system/*"
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
import defaultConfig from './nuxt.config.js'
|
import defaultConfig from './nuxt.config.js'
|
||||||
|
|
||||||
const { css, styleResources, manifest } = defaultConfig
|
const { css, styleResources, manifest, build, mode, buildModules } = defaultConfig
|
||||||
|
|
||||||
|
const CONFIG = require('./config').default // we need to use require since this is only evaluated at compile time.
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
css,
|
mode,
|
||||||
styleResources,
|
|
||||||
manifest,
|
env: CONFIG,
|
||||||
|
|
||||||
head: {
|
head: {
|
||||||
title: manifest.name,
|
title: manifest.name,
|
||||||
@ -32,14 +34,16 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
css,
|
||||||
|
styleResources,
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
|
{ src: '~/plugins/base-components.js', ssr: true },
|
||||||
{ src: `~/plugins/styleguide.js`, ssr: true },
|
{ src: `~/plugins/styleguide.js`, ssr: true },
|
||||||
{ src: '~/plugins/i18n.js', ssr: true },
|
{ src: '~/plugins/i18n.js', ssr: true },
|
||||||
{ src: '~/plugins/v-tooltip.js', ssr: false },
|
{ src: '~/plugins/v-tooltip.js', ssr: false },
|
||||||
],
|
],
|
||||||
|
|
||||||
modules: ['cookie-universal-nuxt', '@nuxtjs/style-resources'],
|
|
||||||
|
|
||||||
router: {
|
router: {
|
||||||
extendRoutes(routes, resolve) {
|
extendRoutes(routes, resolve) {
|
||||||
routes.push({
|
routes.push({
|
||||||
@ -49,14 +53,15 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
|
||||||
extend(config, ctx) {
|
modules: [
|
||||||
config.module.rules.push({
|
['@nuxtjs/dotenv', { only: Object.keys(CONFIG) }],
|
||||||
enforce: 'pre',
|
['nuxt-env', { keys: Object.keys(CONFIG) }],
|
||||||
test: /\.html$/,
|
'cookie-universal-nuxt',
|
||||||
loader: 'raw-loader',
|
'@nuxtjs/style-resources',
|
||||||
exclude: /(node_modules)/,
|
],
|
||||||
})
|
|
||||||
},
|
buildModules,
|
||||||
},
|
manifest,
|
||||||
|
build,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,12 +5,10 @@ import metadata from './constants/metadata.js'
|
|||||||
const CONFIG = require('./config').default // we need to use require since this is only evaluated at compile time.
|
const CONFIG = require('./config').default // we need to use require since this is only evaluated at compile time.
|
||||||
|
|
||||||
const styleguidePath = '../styleguide'
|
const styleguidePath = '../styleguide'
|
||||||
const styleguideStyles = CONFIG.STYLEGUIDE_DEV
|
const styleguideStyles = [
|
||||||
? [
|
`${styleguidePath}/src/system/styles/main.scss`,
|
||||||
`${styleguidePath}/src/system/styles/main.scss`,
|
`${styleguidePath}/src/system/styles/shared.scss`,
|
||||||
`${styleguidePath}/src/system/styles/shared.scss`,
|
]
|
||||||
]
|
|
||||||
: '@human-connection/styleguide/dist/shared.scss'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
buildDir: CONFIG.NUXT_BUILD,
|
buildDir: CONFIG.NUXT_BUILD,
|
||||||
@ -103,7 +101,7 @@ export default {
|
|||||||
styleResources: {
|
styleResources: {
|
||||||
scss: [
|
scss: [
|
||||||
'~assets/_new/styles/uses.scss',
|
'~assets/_new/styles/uses.scss',
|
||||||
styleguideStyles,
|
...styleguideStyles,
|
||||||
'~assets/_new/styles/tokens.scss',
|
'~assets/_new/styles/tokens.scss',
|
||||||
'~assets/styles/imports/_branding.scss',
|
'~assets/styles/imports/_branding.scss',
|
||||||
'~assets/_new/styles/export.scss',
|
'~assets/_new/styles/export.scss',
|
||||||
@ -117,7 +115,7 @@ export default {
|
|||||||
plugins: [
|
plugins: [
|
||||||
{ src: '~/plugins/base-components.js', ssr: true },
|
{ src: '~/plugins/base-components.js', ssr: true },
|
||||||
{
|
{
|
||||||
src: `~/plugins/styleguide${CONFIG.STYLEGUIDE_DEV ? '-dev' : ''}.js`,
|
src: `~/plugins/styleguide.js`,
|
||||||
ssr: true,
|
ssr: true,
|
||||||
},
|
},
|
||||||
{ src: '~/plugins/i18n.js', ssr: true },
|
{ src: '~/plugins/i18n.js', ssr: true },
|
||||||
@ -274,16 +272,11 @@ export default {
|
|||||||
config.devtool = 'source-map'
|
config.devtool = 'source-map'
|
||||||
}
|
}
|
||||||
|
|
||||||
config.resolve.alias['~@'] = path.resolve(__dirname, '/')
|
config.resolve.alias['@@'] = path.resolve(__dirname, `${styleguidePath}/src/system`)
|
||||||
config.resolve.alias['@@'] = path.resolve(__dirname, '/')
|
config.module.rules.push({
|
||||||
|
resourceQuery: /blockType=docs/,
|
||||||
if (CONFIG.STYLEGUIDE_DEV) {
|
loader: require.resolve(`${styleguidePath}/src/loader/docs-trim-loader.js`),
|
||||||
config.resolve.alias['@@'] = path.resolve(__dirname, `${styleguidePath}/src/system`)
|
})
|
||||||
config.module.rules.push({
|
|
||||||
resourceQuery: /blockType=docs/,
|
|
||||||
loader: require.resolve(`${styleguidePath}/src/loader/docs-trim-loader.js`),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const svgRule = config.module.rules.find((rule) => rule.test.test('.svg'))
|
const svgRule = config.module.rules.find((rule) => rule.test.test('.svg'))
|
||||||
svgRule.test = /\.(png|jpe?g|gif|webp)$/
|
svgRule.test = /\.(png|jpe?g|gif|webp)$/
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
"private": false,
|
"private": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider nuxt",
|
"dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider nuxt",
|
||||||
"dev:styleguide": "cross-env STYLEGUIDE_DEV=true yarn run dev",
|
|
||||||
"storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 3002 -s ./static -c storybook/",
|
"storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 3002 -s ./static -c storybook/",
|
||||||
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider nuxt build",
|
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider nuxt build",
|
||||||
"start": "cross-env NODE_OPTIONS=--openssl-legacy-provider nuxt start",
|
"start": "cross-env NODE_OPTIONS=--openssl-legacy-provider nuxt start",
|
||||||
@ -22,7 +21,6 @@
|
|||||||
"test:unit:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --no-cache --runInBand"
|
"test:unit:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --no-cache --runInBand"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@human-connection/styleguide": "0.5.22",
|
|
||||||
"@mapbox/mapbox-gl-geocoder": "^5.0.2",
|
"@mapbox/mapbox-gl-geocoder": "^5.0.2",
|
||||||
"@nuxtjs/apollo": "^4.0.0-rc19",
|
"@nuxtjs/apollo": "^4.0.0-rc19",
|
||||||
"@nuxtjs/axios": "~5.9.7",
|
"@nuxtjs/axios": "~5.9.7",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount, createLocalVue } from '@vue/test-utils'
|
||||||
import BlockedUsers from './blocked-users.vue'
|
import BlockedUsers from './blocked-users.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
import Styleguide from '@@/'
|
||||||
import Filters from '~/plugins/vue-filters'
|
import Filters from '~/plugins/vue-filters'
|
||||||
import { unblockUser } from '~/graphql/settings/BlockedUsers'
|
import { unblockUser } from '~/graphql/settings/BlockedUsers'
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount, createLocalVue } from '@vue/test-utils'
|
||||||
import MutedUsers from './muted-users.vue'
|
import MutedUsers from './muted-users.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
import Styleguide from '@@/'
|
||||||
import Filters from '~/plugins/vue-filters'
|
import Filters from '~/plugins/vue-filters'
|
||||||
import { unmuteUser } from '~/graphql/settings/MutedUsers'
|
import { unmuteUser } from '~/graphql/settings/MutedUsers'
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
import Vue from 'vue'
|
|
||||||
import Styleguide from '@@'
|
|
||||||
|
|
||||||
Vue.use(Styleguide)
|
|
||||||
@ -1,5 +1,4 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
import Styleguide from '@@/'
|
||||||
import '@human-connection/styleguide/dist/system.css'
|
|
||||||
|
|
||||||
Vue.use(Styleguide)
|
Vue.use(Styleguide)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import vuexI18n from 'vuex-i18n/dist/vuex-i18n.umd.js'
|
import vuexI18n from 'vuex-i18n/dist/vuex-i18n.umd.js'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
import Styleguide from '@@/'
|
||||||
import { faker } from '@faker-js/faker'
|
import { faker } from '@faker-js/faker'
|
||||||
import Filters from '~/plugins/vue-filters'
|
import Filters from '~/plugins/vue-filters'
|
||||||
import Directives from '~/plugins/vue-directives'
|
import Directives from '~/plugins/vue-directives'
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../node_modules/@human-connection/styleguide/dist/system.css';
|
@import '../styleguide/src/system/styles/main.scss';
|
||||||
|
@import '../styleguide/src/system/styles/shared.scss';
|
||||||
@import '~/assets/styles/main.scss';
|
@import '~/assets/styles/main.scss';
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
|
|||||||
@ -21,7 +21,8 @@ module.exports = async ({ config, mode }) => {
|
|||||||
patterns: [
|
patterns: [
|
||||||
path.resolve(
|
path.resolve(
|
||||||
__dirname,
|
__dirname,
|
||||||
'../node_modules/@human-connection/styleguide/dist/shared.scss',
|
'../styleguide/src/system/styles/main.scss',
|
||||||
|
'../styleguide/src/system/styles/shared.scss',
|
||||||
),
|
),
|
||||||
path.resolve(__dirname, '../assets/_new/styles/tokens.scss'),
|
path.resolve(__dirname, '../assets/_new/styles/tokens.scss'),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { createLocalVue } from '@vue/test-utils'
|
import { createLocalVue } from '@vue/test-utils'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import VTooltip from 'v-tooltip'
|
import VTooltip from 'v-tooltip'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
import Styleguide from '@@/'
|
||||||
import BaseComponents from '~/plugins/base-components'
|
import BaseComponents from '~/plugins/base-components'
|
||||||
import Filters from '~/plugins/vue-filters'
|
import Filters from '~/plugins/vue-filters'
|
||||||
import InfiniteLoading from '~/plugins/vue-infinite-loading'
|
import InfiniteLoading from '~/plugins/vue-infinite-loading'
|
||||||
|
|||||||
@ -2536,13 +2536,6 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-9.9.0.tgz#3ad015fbbaaae7af3149555e0f22b4b30134c69d"
|
resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-9.9.0.tgz#3ad015fbbaaae7af3149555e0f22b4b30134c69d"
|
||||||
integrity sha512-OEl393iCOoo/z8bMezRlJu+GlRGlsKbUAN7jKB6LhnKoqKve5DXRpalbItIIcwnCjs1k/FOPjFzcA6Qn+H+YbA==
|
integrity sha512-OEl393iCOoo/z8bMezRlJu+GlRGlsKbUAN7jKB6LhnKoqKve5DXRpalbItIIcwnCjs1k/FOPjFzcA6Qn+H+YbA==
|
||||||
|
|
||||||
"@human-connection/styleguide@0.5.22":
|
|
||||||
version "0.5.22"
|
|
||||||
resolved "https://registry.yarnpkg.com/@human-connection/styleguide/-/styleguide-0.5.22.tgz#444ec98b8f8d1c438e2e99736dcffe432b302755"
|
|
||||||
integrity sha512-zYDhWWoDIEcUhAJPSrb2azBPxBfcr6igVtTx1Bz/FNMW2bIWfZIRv9U4LaJ9RG/GgjKNcVE+OPdB8zCcwqyQyA==
|
|
||||||
dependencies:
|
|
||||||
vue "^2.6.10"
|
|
||||||
|
|
||||||
"@humanwhocodes/config-array@^0.5.0":
|
"@humanwhocodes/config-array@^0.5.0":
|
||||||
version "0.5.0"
|
version "0.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9"
|
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9"
|
||||||
@ -20331,11 +20324,6 @@ vue2-dropzone@3.6.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
dropzone "^5.5.1"
|
dropzone "^5.5.1"
|
||||||
|
|
||||||
vue@^2.6.10:
|
|
||||||
version "2.6.10"
|
|
||||||
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.10.tgz#a72b1a42a4d82a721ea438d1b6bf55e66195c637"
|
|
||||||
integrity sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==
|
|
||||||
|
|
||||||
vue@^2.6.11:
|
vue@^2.6.11:
|
||||||
version "2.6.11"
|
version "2.6.11"
|
||||||
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5"
|
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user