@studio-fes/create-fes-app 0.4.10 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/templates/craft/.env.example +6 -2
- package/dist/templates/craft/.vscode/extensions.json +0 -1
- package/dist/templates/craft/.vscode/settings.json +1 -1
- package/dist/templates/craft/_gitignore +1 -0
- package/dist/templates/craft/app/components/CraftSvg.vue +19 -0
- package/dist/templates/craft/app/layouts/default.vue +8 -0
- package/dist/templates/craft/nuxt.config.ts +12 -0
- package/dist/templates/craft/package.json +6 -5
- package/dist/templates/craft/server/multiCache.serverOptions.ts +2 -24
- package/dist/templates/craft/uno.config.ts +53 -0
- package/dist/templates/strapi/package.json +3 -3
- package/package.json +1 -1
|
@@ -5,5 +5,9 @@ NUXT_PUBLIC_BACKEND_URL="https://admin.xxx.it"
|
|
|
5
5
|
NUXT_IMAGE_PROVIDER="cloudflare"
|
|
6
6
|
NUXT_IMAGE_CLOUDFLARE_BASE_URL="https://cdn.xxx.it"
|
|
7
7
|
|
|
8
|
-
#
|
|
9
|
-
#
|
|
8
|
+
# cache dati di nuxt-multi-cache: con NUXT_REDIS_URL usa Redis, altrimenti fs se NUXT_CACHE_ENABLED è "true".
|
|
9
|
+
# Senza cache non vengono emessi nemmeno gli header CDN (CDN-Cache-Control, Cache-Tag)
|
|
10
|
+
# NUXT_REDIS_URL="redis://:password@host:6379/0"
|
|
11
|
+
# NUXT_CACHE_ENABLED="true"
|
|
12
|
+
# header CDN per Cloudflare (Cache Rules sul dashboard, purge da craft-toolkit)
|
|
13
|
+
# NUXT_CDN_CACHE_ENABLED="true"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CraftImageProps } from '@studio-fes/layer-craft/app/components/CraftImage.vue'
|
|
3
|
+
import type { CraftVideoProps } from '@studio-fes/layer-craft/app/components/CraftVideo.vue'
|
|
4
|
+
import type { MediaFragment } from '#graphql-operations'
|
|
5
|
+
|
|
6
|
+
interface CraftSvgProps {
|
|
7
|
+
media: MediaFragment | null | undefined
|
|
8
|
+
imgProps?: CraftImageProps
|
|
9
|
+
videoProps?: CraftVideoProps
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const props = defineProps<CraftSvgProps>()
|
|
13
|
+
const isSvg = computed(() => props.media && props.media?.format === 'svg')
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<RemoteSvg v-if="media && isSvg" :src="media.url" />
|
|
18
|
+
<CraftMedia v-else-if="media" :media />
|
|
19
|
+
</template>
|
|
@@ -5,6 +5,18 @@ export default defineNuxtConfig({
|
|
|
5
5
|
'@studio-fes/layer-craft',
|
|
6
6
|
],
|
|
7
7
|
|
|
8
|
+
modules: [
|
|
9
|
+
'@studio-fes/nuxt-remote-svg',
|
|
10
|
+
],
|
|
11
|
+
|
|
12
|
+
vite: {
|
|
13
|
+
optimizeDeps: {
|
|
14
|
+
include: [
|
|
15
|
+
'@studio-fes/nuxt-remote-svg',
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
|
|
8
20
|
eslint: {
|
|
9
21
|
config: {
|
|
10
22
|
standalone: false,
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
"postinstall": "nuxt prepare"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@studio-fes/layer-base": "^0.
|
|
14
|
-
"@studio-fes/layer-craft": "^0.
|
|
15
|
-
"nuxt": "
|
|
13
|
+
"@studio-fes/layer-base": "^0.5.0",
|
|
14
|
+
"@studio-fes/layer-craft": "^0.5.0",
|
|
15
|
+
"@studio-fes/nuxt-remote-svg": "0.1.9",
|
|
16
|
+
"nuxt": "^4.6.0",
|
|
16
17
|
"vue": "^3.5.43",
|
|
17
18
|
"vue-router": "^5.3.1"
|
|
18
19
|
},
|
|
@@ -20,9 +21,9 @@
|
|
|
20
21
|
"@antfu/eslint-config": "^9.5.1",
|
|
21
22
|
"@graphql-eslint/eslint-plugin": "^4.4.1",
|
|
22
23
|
"@unocss/eslint-config": "^66.10.5",
|
|
23
|
-
"eslint": "^10.
|
|
24
|
+
"eslint": "^10.12.0",
|
|
24
25
|
"eslint-plugin-format": "^2.0.1",
|
|
25
26
|
"eslint-plugin-slop": "^0.1.3",
|
|
26
|
-
"eslint-plugin-sonarjs": "^4.2.
|
|
27
|
+
"eslint-plugin-sonarjs": "^4.2.2"
|
|
27
28
|
}
|
|
28
29
|
}
|
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { defineMultiCacheOptions } from 'nuxt-multi-cache/server-options'
|
|
4
|
-
// import cloudflareKVBindingDriver from 'unstorage/drivers/cloudflare-kv-binding'
|
|
5
|
-
import fsDriver from 'unstorage/drivers/fs'
|
|
6
|
-
import nullDriver from 'unstorage/drivers/null'
|
|
7
|
-
|
|
8
|
-
/** const isDev = import.meta.dev */
|
|
9
|
-
export default defineMultiCacheOptions(() => {
|
|
10
|
-
const config = useRuntimeConfig()
|
|
11
|
-
const { multiCacheEnabled } = config
|
|
12
|
-
|
|
13
|
-
const driver = multiCacheEnabled
|
|
14
|
-
? fsDriver({ base: '.nuxt-multi-cache' })
|
|
15
|
-
: nullDriver()
|
|
16
|
-
|
|
17
|
-
return {
|
|
18
|
-
data: {
|
|
19
|
-
storage: {
|
|
20
|
-
driver,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
}
|
|
24
|
-
})
|
|
1
|
+
// nuxt-multi-cache cerca questo file solo nel progetto, non nei layer: la configurazione (fs/Redis) vive in layer-craft
|
|
2
|
+
export { default } from '@studio-fes/layer-craft/server/multiCache.serverOptions'
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PresetWind4Theme } from 'unocss'
|
|
1
2
|
import { defineConfig, presetWind4, transformerDirectives } from 'unocss'
|
|
2
3
|
|
|
3
4
|
export default defineConfig({
|
|
@@ -12,4 +13,56 @@ export default defineConfig({
|
|
|
12
13
|
transformers: [
|
|
13
14
|
transformerDirectives(),
|
|
14
15
|
],
|
|
16
|
+
|
|
17
|
+
blocklist: [
|
|
18
|
+
'container',
|
|
19
|
+
],
|
|
20
|
+
extendTheme: (theme: PresetWind4Theme) => {
|
|
21
|
+
return {
|
|
22
|
+
...theme,
|
|
23
|
+
breakpoint: {
|
|
24
|
+
...theme.breakpoint,
|
|
25
|
+
'3xl': '1680px',
|
|
26
|
+
'4xl': '1920px',
|
|
27
|
+
'5xl': '2560px',
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
shortcuts: {
|
|
32
|
+
'capsize': '[text-box-edge:cap_alphabetic] [text-box-trim:trim-both]',
|
|
33
|
+
|
|
34
|
+
// Transition utils
|
|
35
|
+
'motion-base':
|
|
36
|
+
'transition-opacity,transform,colors duration-500 ease-custom-circ will-change-transform',
|
|
37
|
+
'motion-snug':
|
|
38
|
+
'transition-opacity,transform,colors duration-300 ease-custom-circ will-change-transform',
|
|
39
|
+
'motion-natural':
|
|
40
|
+
'transition-opacity,transform,colors duration-700 ease-custom-circ will-change-transform',
|
|
41
|
+
'motion-relaxed':
|
|
42
|
+
'transition-opacity,transform,colors duration-1000 ease-custom-circ will-change-transform',
|
|
43
|
+
|
|
44
|
+
// Layout utils
|
|
45
|
+
'lay-v': 'grid grid-flow-row [grid-auto-columns:minmax(0,1fr)] [grid-template-rows:minmax(0,auto)]',
|
|
46
|
+
'lay-h': 'grid grid-flow-col [grid-auto-columns:minmax(0,1fr)] [grid-template-rows:minmax(0,auto)]',
|
|
47
|
+
'lay-fluid': 'grid grid-flow-row auto-rows-fr [grid-auto-columns:minmax(0,1fr)]',
|
|
48
|
+
'lay-o': 'grid [&>*]:[grid-area:1/1]',
|
|
49
|
+
|
|
50
|
+
// Typography
|
|
51
|
+
'typo-sans-1': 'capsize font-sans font-medium text-3 leading-3.5 lg:text-3.5 lg:leading-3.75 tracking-0.01em', // legal / fine print
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
theme: {
|
|
55
|
+
colors: {
|
|
56
|
+
|
|
57
|
+
},
|
|
58
|
+
ease: {
|
|
59
|
+
'custom-expo': 'cubic-bezier(0.19, 1, 0.22, 1)',
|
|
60
|
+
'custom-power': 'cubic-bezier(0.76, 0, 0.24, 1)',
|
|
61
|
+
'custom-expo2': 'cubic-bezier(0.83, 0, 0.17, 1)',
|
|
62
|
+
'custom-circ': 'cubic-bezier(0.25, 1, 0.5, 1)',
|
|
63
|
+
},
|
|
64
|
+
font: {
|
|
65
|
+
sans: '"Inter", Arial, sans-serif',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
15
68
|
})
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"postinstall": "nuxt prepare"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@studio-fes/layer-base": "^0.
|
|
14
|
-
"@studio-fes/layer-strapi": "^0.
|
|
15
|
-
"nuxt": "^4.
|
|
13
|
+
"@studio-fes/layer-base": "^0.5.0",
|
|
14
|
+
"@studio-fes/layer-strapi": "^0.5.0",
|
|
15
|
+
"nuxt": "^4.6.0",
|
|
16
16
|
"vue": "^3.5.43",
|
|
17
17
|
"vue-router": "^5.3.1"
|
|
18
18
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studio-fes/create-fes-app",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"description": "Interactive wizard to scaffold a new project from the studio fes Nuxt layers starters (Craft CMS, Strapi).",
|
|
6
6
|
"bin": {
|
|
7
7
|
"create-fes-app": "bin/create-fes-app.mjs"
|