This commit is contained in:
@@ -21,6 +21,10 @@ jobs:
|
|||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '22'
|
node-version: '22'
|
||||||
|
- name: install zopfli & brotli
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y zopfli brotli
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
corepack enable
|
corepack enable
|
||||||
@@ -29,6 +33,12 @@ jobs:
|
|||||||
- name: build production
|
- name: build production
|
||||||
run: cd build/frontend && npm run build-only -- --emptyOutDir --outDir /www/hereconnect.condev.ru/build-${{env.GITHUB_SHA}}-prod/
|
run: cd build/frontend && npm run build-only -- --emptyOutDir --outDir /www/hereconnect.condev.ru/build-${{env.GITHUB_SHA}}-prod/
|
||||||
|
|
||||||
|
- name: compress production with Brotli
|
||||||
|
run: |
|
||||||
|
find /www/hereconnect.condev.ru/build-${{env.GITHUB_SHA}}-prod/ -type f \( -name '*.js' -o -name '*.css' -o -name '*.html' -o -name '*.svg' -o -name '*.eot' -o -name '*.ttf' -o -name '*.woff' -o -name '*.woff2' \) | while read -r file; do
|
||||||
|
brotli -k -q 11 "$file"
|
||||||
|
done
|
||||||
|
|
||||||
- name: deploy production
|
- name: deploy production
|
||||||
run: mv -v /www/hereconnect.condev.ru/current-prod /www/hereconnect.condev.ru/old-prod && mv -v /www/hereconnect.condev.ru/build-${{env.GITHUB_SHA}}-prod /www/hereconnect.condev.ru/current-prod && rm -rf /www/hereconnect.condev.ru/old-prod
|
run: mv -v /www/hereconnect.condev.ru/current-prod /www/hereconnect.condev.ru/old-prod && mv -v /www/hereconnect.condev.ru/build-${{env.GITHUB_SHA}}-prod /www/hereconnect.condev.ru/current-prod && rm -rf /www/hereconnect.condev.ru/old-prod
|
||||||
|
|
||||||
|
|||||||
Vendored
+5
@@ -8,8 +8,10 @@ export {}
|
|||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
Button: typeof import('primevue/button')['default']
|
Button: typeof import('primevue/button')['default']
|
||||||
|
Card: typeof import('primevue/card')['default']
|
||||||
ChatComponent: typeof import('./src/components/ChatComponent.vue')['default']
|
ChatComponent: typeof import('./src/components/ChatComponent.vue')['default']
|
||||||
ChatSubscribeWebPush: typeof import('./src/components/ChatSubscribeWebPush.vue')['default']
|
ChatSubscribeWebPush: typeof import('./src/components/ChatSubscribeWebPush.vue')['default']
|
||||||
|
Checkbox: typeof import('primevue/checkbox')['default']
|
||||||
CreateActionsSection: typeof import('./src/components/create/CreateActionsSection.vue')['default']
|
CreateActionsSection: typeof import('./src/components/create/CreateActionsSection.vue')['default']
|
||||||
CreateMessageDeliveryMethodSection: typeof import('./src/components/create/CreateMessageDeliveryMethodSection.vue')['default']
|
CreateMessageDeliveryMethodSection: typeof import('./src/components/create/CreateMessageDeliveryMethodSection.vue')['default']
|
||||||
CreateMessageDeliveryOption: typeof import('./src/components/create/CreateMessageDeliveryOption.vue')['default']
|
CreateMessageDeliveryOption: typeof import('./src/components/create/CreateMessageDeliveryOption.vue')['default']
|
||||||
@@ -23,8 +25,11 @@ declare module 'vue' {
|
|||||||
CreateSummarySection: typeof import('./src/components/create/CreateSummarySection.vue')['default']
|
CreateSummarySection: typeof import('./src/components/create/CreateSummarySection.vue')['default']
|
||||||
DownloadImageButton: typeof import('./src/components/manage/DownloadImageButton.vue')['default']
|
DownloadImageButton: typeof import('./src/components/manage/DownloadImageButton.vue')['default']
|
||||||
ExamplesSection: typeof import('./src/components/TheWelcome/ExamplesSection.vue')['default']
|
ExamplesSection: typeof import('./src/components/TheWelcome/ExamplesSection.vue')['default']
|
||||||
|
InputText: typeof import('primevue/inputtext')['default']
|
||||||
ManagePlacementInstructions: typeof import('./src/components/manage/ManagePlacementInstructions.vue')['default']
|
ManagePlacementInstructions: typeof import('./src/components/manage/ManagePlacementInstructions.vue')['default']
|
||||||
|
ProgressSpinner: typeof import('primevue/progressspinner')['default']
|
||||||
QueryRender: typeof import('./src/components/QueryRender.vue')['default']
|
QueryRender: typeof import('./src/components/QueryRender.vue')['default']
|
||||||
|
RadioButton: typeof import('primevue/radiobutton')['default']
|
||||||
ReadContactInfo: typeof import('./src/components/read/ReadContactInfo.vue')['default']
|
ReadContactInfo: typeof import('./src/components/read/ReadContactInfo.vue')['default']
|
||||||
ReadMessageSender: typeof import('./src/components/read/ReadMessageSender.vue')['default']
|
ReadMessageSender: typeof import('./src/components/read/ReadMessageSender.vue')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ import { type QRCodeDocument } from '@hereconnect/types'
|
|||||||
|
|
||||||
// Импортируем все инструкции из директории
|
// Импортируем все инструкции из директории
|
||||||
const importInstructions = import.meta.glob('/src/content/placementInstructions/*.md', {
|
const importInstructions = import.meta.glob('/src/content/placementInstructions/*.md', {
|
||||||
as: 'raw',
|
query: '?raw',
|
||||||
|
import: 'default',
|
||||||
}) as unknown as Record<string, () => Promise<string>>
|
}) as unknown as Record<string, () => Promise<string>>
|
||||||
|
|
||||||
const { placement } = defineProps<{ placement: QRCodeDocument['placement'] }>()
|
const { placement } = defineProps<{ placement: QRCodeDocument['placement'] }>()
|
||||||
|
|||||||
@@ -9,23 +9,29 @@ import AutoImport from 'unplugin-auto-import/vite'
|
|||||||
import { unheadComposablesImports } from 'unhead'
|
import { unheadComposablesImports } from 'unhead'
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig(({ mode }) => {
|
||||||
plugins: [
|
console.log('Building in mode', mode)
|
||||||
vue(),
|
return {
|
||||||
AutoImport({
|
build: {
|
||||||
imports: ['vue', 'vue-router', unheadComposablesImports[0]],
|
sourcemap: mode === 'development',
|
||||||
}),
|
|
||||||
Components({
|
|
||||||
resolvers: [PrimeVueResolver()],
|
|
||||||
}),
|
|
||||||
vueDevTools(),
|
|
||||||
],
|
|
||||||
define: {
|
|
||||||
global: 'window', // it is needed for PouchDB
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
||||||
},
|
},
|
||||||
},
|
plugins: [
|
||||||
|
vue(),
|
||||||
|
AutoImport({
|
||||||
|
imports: ['vue', 'vue-router', unheadComposablesImports[0]],
|
||||||
|
}),
|
||||||
|
Components({
|
||||||
|
resolvers: [PrimeVueResolver()],
|
||||||
|
}),
|
||||||
|
vueDevTools(),
|
||||||
|
],
|
||||||
|
define: {
|
||||||
|
global: 'window', // it is needed for PouchDB
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user