dev #60
|
@ -4,10 +4,10 @@ services:
|
||||||
context: ./
|
context: ./
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
# env_file: ".env"
|
# env_file: ".env"
|
||||||
container_name: mns_mini_zabor_${BRANCH}
|
container_name: mns_mini_zabor_${BRANCH:-dev}
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "${DOCKER_PORT}:3000"
|
- "${DOCKER_PORT:-80}:3000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./.env:/src/.env
|
- ./.env:/src/.env
|
||||||
image: ci.svs-tech.pro/mns-mini-zabor:$BRANCH
|
image: ci.svs-tech.pro/mns-mini-zabor:${BRANCH:-dev}
|
||||||
|
|
|
@ -1,38 +1,7 @@
|
||||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
import fs from 'fs/promises'
|
|
||||||
import chalk from 'chalk';
|
|
||||||
import imagemin from 'imagemin';
|
|
||||||
import imageminPngquant from 'imagemin-pngquant';
|
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
hooks: {
|
hooks: {},
|
||||||
'nitro:build:public-assets': async (nitro) => {
|
|
||||||
console.log(`😈 custom hook imagemin in ${nitro.options.output.publicDir}`)
|
|
||||||
const output_path = nitro.options.output.publicDir
|
|
||||||
const filelist = await fs.readdir(output_path, { recursive: true });
|
|
||||||
for (let index = 0; index < filelist.length; index++) {
|
|
||||||
const element = filelist[index];
|
|
||||||
const elementFile = await fs.lstat(`${output_path}/${element}`)
|
|
||||||
if (element.startsWith('_nuxt')) continue
|
|
||||||
if (elementFile.isFile()) {
|
|
||||||
if (element.endsWith('.png')) {
|
|
||||||
const dest = `${output_path}/${element.split('/').slice(0, -1).join('/')}`
|
|
||||||
const res = await imagemin([`${output_path}/${element}`], {
|
|
||||||
destination: dest,
|
|
||||||
plugins: [
|
|
||||||
imageminPngquant({
|
|
||||||
quality: [0.6, 0.8]
|
|
||||||
})
|
|
||||||
]
|
|
||||||
})
|
|
||||||
if (res.length) {
|
|
||||||
console.log(chalk.gray(` compress PNG ${output_path}/${element}`))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
app: {
|
app: {
|
||||||
pageTransition: { name: 'page', mode: 'out-in' },
|
pageTransition: { name: 'page', mode: 'out-in' },
|
||||||
head: {
|
head: {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -20,8 +20,7 @@
|
||||||
"@tresjs/cientos": "^3.9.0",
|
"@tresjs/cientos": "^3.9.0",
|
||||||
"@tresjs/core": "^4.0.2",
|
"@tresjs/core": "^4.0.2",
|
||||||
"@tresjs/nuxt": "^2.1.2",
|
"@tresjs/nuxt": "^2.1.2",
|
||||||
"imagemin": "^9.0.0",
|
"consola": "^3.2.3",
|
||||||
"imagemin-pngquant": "^10.0.0",
|
|
||||||
"marked": "^12.0.2",
|
"marked": "^12.0.2",
|
||||||
"nuxt": "^3.11.2",
|
"nuxt": "^3.11.2",
|
||||||
"nuxt-icon": "^0.6.10",
|
"nuxt-icon": "^0.6.10",
|
||||||
|
|
Loading…
Reference in New Issue