create-berna-stencil 1.0.44 → 1.0.45

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/.eleventy.js CHANGED
@@ -4,7 +4,7 @@ const Image = require("@11ty/eleventy-img");
4
4
  const fs = require("fs");
5
5
  const path = require("path");
6
6
 
7
- const OUTPUT_DIR = "out";
7
+ const OUTPUT_DIR = "c:/laragon/www/Berna-Stencil-out";
8
8
 
9
9
  module.exports = function (eleventyConfig) {
10
10
 
@@ -33,7 +33,7 @@ module.exports = function (eleventyConfig) {
33
33
  outdir: `${OUTPUT_DIR}/js/pages`,
34
34
  minify: true,
35
35
  });
36
- copyRecursiveSync("src/backend", `${OUTPUT_DIR}/api`);
36
+ copyRecursiveSync("src/backend", `${OUTPUT_DIR}/backend`);
37
37
  });
38
38
 
39
39
  // =====================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-berna-stencil",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "Eleventy boilerplate with per-page SCSS/JS pipeline, esbuild bundling, multi-framework CSS support and a built-in page management CLI",
5
5
  "keywords": [
6
6
  "eleventy",
@@ -60,12 +60,12 @@
60
60
  "sass": "^1.77.0"
61
61
  },
62
62
  "scripts": {
63
- "build:css": "sass src/frontend/scss:out/css --no-source-map --style=compressed --quiet",
64
- "build:js": "esbuild \"src/frontend/js/pages/*.js\" --bundle --outdir=out/js/pages --minify",
63
+ "build:css": "sass src/frontend/scss:c:/laragon/www/Berna-Stencil-out/css --no-source-map --style=compressed --quiet",
64
+ "build:js": "esbuild \"src/frontend/js/pages/*.js\" --bundle --outdir=c:/laragon/www/Berna-Stencil-out/js/pages --minify",
65
65
  "build:11ty": "eleventy",
66
66
  "build": "npm run build:css && npm run build:js && npm run build:11ty",
67
- "serve:css": "sass --watch src/frontend/scss:out/css --no-source-map --quiet",
68
- "serve:js": "esbuild \"src/frontend/js/pages/*.js\" --bundle --outdir=out/js/pages --watch",
67
+ "serve:css": "sass --watch src/frontend/scss:c:/laragon/www/Berna-Stencil-out/css --no-source-map --quiet",
68
+ "serve:js": "esbuild \"src/frontend/js/pages/*.js\" --bundle --outdir=c:/laragon/www/Berna-Stencil-out/js/pages --watch",
69
69
  "serve:11ty": "eleventy --serve --quiet",
70
70
  "clean": "node _tools/cleanOutput.js",
71
71
  "serve": "npm run clean && concurrently \"npm run serve:11ty\" \"npm run serve:css\" \"npm run serve:js\"",
@@ -4,14 +4,11 @@
4
4
  <rewrite>
5
5
  <rules>
6
6
 
7
- <!-- 1. Permetti l'esecuzione diretta solo a index.php -->
8
7
  <rule name="Allow API index.php" stopProcessing="true">
9
8
  <match url="^_core/index\.php$" ignoreCase="true" />
10
9
  <action type="None" />
11
10
  </rule>
12
11
 
13
- <!-- 2. Front Controller: Invia TUTTO il resto a index.php -->
14
- <!-- Nessun controllo sull'esistenza di file o directory. -->
15
12
  <rule name="API Endpoints Front Controller Catch-All" stopProcessing="true">
16
13
  <match url="^(.*)$" ignoreCase="true" />
17
14
  <action type="Rewrite" url="_core/index.php" appendQueryString="true" />
@@ -1,18 +1,13 @@
1
- # Forza Apache a usare il file 404.html di Eleventy per ogni errore 404
2
1
  ErrorDocument 404 /404.html
3
2
 
4
3
  <IfModule mod_rewrite.c>
5
4
  RewriteEngine On
6
5
  RewriteBase /
7
6
 
8
- # 1. Se la richiesta è per la cartella API, non fare nulla qui
9
- # (se ne occupa l'altro .htaccess dentro /api/)
10
- RewriteRule ^api/ - [L]
7
+ RewriteRule ^api/(.*)$ backend/_core/index.php [QSA,L]
11
8
 
12
- # 2. Se il file o la cartella richiesti esistono fisicamente, servili normalmente
13
9
  RewriteCond %{REQUEST_FILENAME} -f [OR]
14
10
  RewriteCond %{REQUEST_FILENAME} -d
15
11
  RewriteRule ^ - [L]
16
12
 
17
- # 3. Se non esistono e non siamo in /api, Apache userà l'ErrorDocument 404 sopra
18
13
  </IfModule>
@@ -16,9 +16,9 @@
16
16
 
17
17
  <rewrite>
18
18
  <rules>
19
- <rule name="Ignore API Directory" stopProcessing="true">
20
- <match url="^api(/.*)?$" ignoreCase="true" />
21
- <action type="None" />
19
+ <rule name="Pass API to Backend" stopProcessing="true">
20
+ <match url="^api/(.*)$" ignoreCase="true" />
21
+ <action type="Rewrite" url="backend/{R:1}" />
22
22
  </rule>
23
23
  </rules>
24
24
  </rewrite>