From c9ad1e1c0ed4a0c0bd48401c1dd555915bebc815 Mon Sep 17 00:00:00 2001 From: Willy Brauner Date: Tue, 4 Jul 2023 12:07:26 +0200 Subject: [PATCH] Update dist/front/ to dist/ --- apps/front/.gitignore | 5 ++--- apps/front/README.md | 2 +- apps/front/config/config.js | 14 +++++++------- apps/front/package.json | 10 +++++----- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/apps/front/.gitignore b/apps/front/.gitignore index 3f99137..67be514 100644 --- a/apps/front/.gitignore +++ b/apps/front/.gitignore @@ -1,6 +1,5 @@ # Output application depend of project -dist/front -dist/api/web/app/.cache +dist vendor .env.local @@ -13,4 +12,4 @@ dist-ssr *.local .cache vite.config.ts.timestamp* -build-stats.html \ No newline at end of file +build-stats.html diff --git a/apps/front/README.md b/apps/front/README.md index 42f4998..680c90e 100644 --- a/apps/front/README.md +++ b/apps/front/README.md @@ -164,7 +164,7 @@ Once a new file is composed, it is copied to the selected folder(s). .env out directory(ies) array is defined from [config/config.js](config/config.js): ```js -buildDotenvOutDir: [resolve("dist/front/www/")] +buildDotenvOutDir: [resolve("dist/www/")] ``` This plugin is mandatory for the use of the default cher-site config with the PHP micro framework. diff --git a/apps/front/config/config.js b/apps/front/config/config.js index 91939dc..2d48acd 100644 --- a/apps/front/config/config.js +++ b/apps/front/config/config.js @@ -12,11 +12,11 @@ export default { // outDir: where files are built // If this value is change, add this new path in .gitignore distDir: resolve("dist"), - outDir: resolve("dist/front"), - outDirScripts: resolve("dist/front/_scripts"), - outDirClient: resolve("dist/front/client"), - outDirServer: resolve("dist/front/server"), - outDirStatic: resolve("dist/front/static"), + outDir: resolve("dist"), + outDirScripts: resolve("dist/_scripts"), + outDirClient: resolve("dist/client"), + outDirServer: resolve("dist/server"), + outDirStatic: resolve("dist/static"), // TODO uniquement pour version PHP // Directory name of the build folder (will be cleaned before build) @@ -27,7 +27,7 @@ export default { // outDir: where files are built // last folder need to be sync with `buildDirname` // If this value is change, add this new path in .gitignore - // outDir: resolve("dist/front/www/static/"), + // outDir: resolve("dist/www/static/"), // Input entry files array // Set the relative paths, don't resolve them. @@ -41,7 +41,7 @@ export default { // Build dotenv outDir array // This task can build the same dotenv files in different directories buildDotenvOutDir: [ - // resolve("dist/front/") + // resolve("dist/") ], // Build htaccess diff --git a/apps/front/package.json b/apps/front/package.json index 1c57749..ca87b14 100644 --- a/apps/front/package.json +++ b/apps/front/package.json @@ -7,13 +7,13 @@ "type": "module", "scripts": { "dev": "node server.js", - "build:client": "vite build --outDir dist/front/client", - "build:server": "vite build --ssr src/server/index-server.tsx --outDir dist/front/server", + "build:client": "vite build --outDir dist/client", + "build:server": "vite build --ssr src/server/index-server.tsx --outDir dist/server", "build:scripts": "vite build -c vite.scripts.config.ts", - "build:static": "vite build --outDir dist/front/static", + "build:static": "vite build --outDir dist/static", "build": "npm run build:server && npm run build:scripts && npm run build:static && npm run generate", - "generate": "node dist/front/_scripts/exe-prerender.js", - "preview": "serve dist/front/static", + "generate": "node dist/_scripts/exe-prerender.js", + "preview": "serve dist/static", "setup": "node config/tasks/setup/setup.js && npm run prepare", "scaffold": "node config/tasks/scaffold-component/scaffold-component.js", "scaffold-wp": "node config/tasks/scaffold-wp/scaffold-wp.js",