create-berna-stencil 1.0.7 → 1.0.9
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 +3 -1
- package/_tools/res/templates.json +2 -2
- package/bin/create.js +1 -1
- package/package.json +5 -5
- package/src/.htaccess +18 -0
- package/src/api/.htaccess +12 -0
- package/src/api/composer.json +6 -0
- package/src/api/composer.lock +574 -0
- package/src/api/endpoints/protected/secret.php +16 -0
- package/src/api/endpoints/protected/send-mail.php +75 -0
- package/src/api/endpoints/public/ping.php +16 -0
- package/src/api/index.php +95 -0
- package/src/api/init.php +43 -0
- package/src/api/modules/Response.php +37 -0
- package/src/api/vendor/autoload.php +22 -0
- package/src/api/vendor/composer/ClassLoader.php +579 -0
- package/src/api/vendor/composer/InstalledVersions.php +396 -0
- package/src/api/vendor/composer/LICENSE +21 -0
- package/src/api/vendor/composer/autoload_classmap.php +15 -0
- package/src/api/vendor/composer/autoload_files.php +12 -0
- package/src/api/vendor/composer/autoload_namespaces.php +9 -0
- package/src/api/vendor/composer/autoload_psr4.php +16 -0
- package/src/api/vendor/composer/autoload_real.php +50 -0
- package/src/api/vendor/composer/autoload_static.php +86 -0
- package/src/api/vendor/composer/installed.json +582 -0
- package/src/api/vendor/composer/installed.php +86 -0
- package/src/api/vendor/composer/platform_check.php +25 -0
- package/src/data/site.json +53 -53
- package/src/js/pages/404.js +2 -2
- package/src/js/pages/anotherPage.js +2 -2
- package/src/js/pages/homepage.js +2 -2
- package/src/scss/pages/404.scss +1 -0
- package/src/api/configExample.php +0 -28
- package/src/api/sendEmail.php +0 -131
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
|
|
|
@@ -24,6 +24,8 @@ module.exports = function (eleventyConfig) {
|
|
|
24
24
|
// =====================================================
|
|
25
25
|
// PASSTHROUGH — Static files
|
|
26
26
|
// =====================================================
|
|
27
|
+
eleventyConfig.addPassthroughCopy(".env");
|
|
28
|
+
eleventyConfig.addPassthroughCopy("src/.htaccess");
|
|
27
29
|
eleventyConfig.addPassthroughCopy("src/api");
|
|
28
30
|
eleventyConfig.addPassthroughCopy("src/assets");
|
|
29
31
|
eleventyConfig.addPassthroughCopy("src/robots.txt");
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"import { showNotification } from '../modules/notification.js';",
|
|
41
41
|
"",
|
|
42
42
|
"// Uncomment to enable optional modules (call inside DOMContentLoaded)",
|
|
43
|
-
"// import { initTextAreaAutoExpand } from '../modules/textAreaAutoExpand.js';",
|
|
44
|
-
"// import { initNormalizePhoneNumber } from '../modules/normalizePhoneNumber.js';",
|
|
43
|
+
"// import { initTextAreaAutoExpand } from '../modules/forms/textAreaAutoExpand.js';",
|
|
44
|
+
"// import { initNormalizePhoneNumber } from '../modules/forms/normalizePhoneNumber.js';",
|
|
45
45
|
"",
|
|
46
46
|
"//==========================",
|
|
47
47
|
"// \"{{pageName}}\" PAGE CUSTOM JAVASCRIPT",
|
package/bin/create.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-berna-stencil",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
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",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"sass": "^1.77.0"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
|
-
"build:css": "sass src/scss:out/css --no-source-map --style=compressed --quiet",
|
|
61
|
-
"build:js": "esbuild \"src/js/pages/*.js\" --bundle --outdir=out/js/pages --minify",
|
|
60
|
+
"build:css": "sass src/scss:C:/laragon/www/Berna-Stencil-out/css --no-source-map --style=compressed --quiet",
|
|
61
|
+
"build:js": "esbuild \"src/js/pages/*.js\" --bundle --outdir=C:/laragon/www/Berna-Stencil-out/js/pages --minify",
|
|
62
62
|
"build:11ty": "eleventy",
|
|
63
63
|
"build": "npm run build:css && npm run build:js && npm run build:11ty",
|
|
64
|
-
"serve:css": "sass --watch src/scss:out/css --no-source-map --quiet",
|
|
65
|
-
"serve:js": "esbuild \"src/js/pages/*.js\" --bundle --outdir=out/js/pages --watch",
|
|
64
|
+
"serve:css": "sass --watch src/scss:C:/laragon/www/Berna-Stencil-out/css --no-source-map --quiet",
|
|
65
|
+
"serve:js": "esbuild \"src/js/pages/*.js\" --bundle --outdir=C:/laragon/www/Berna-Stencil-out/js/pages --watch",
|
|
66
66
|
"serve:11ty": "eleventy --serve --quiet",
|
|
67
67
|
"clean": "node _tools/cleanOutput.js",
|
|
68
68
|
"serve": "npm run clean && concurrently \"npm run serve:11ty\" \"npm run serve:css\" \"npm run serve:js\"",
|
package/src/.htaccess
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Forza Apache a usare il file 404.html di Eleventy per ogni errore 404
|
|
2
|
+
ErrorDocument 404 /404.html
|
|
3
|
+
|
|
4
|
+
<IfModule mod_rewrite.c>
|
|
5
|
+
RewriteEngine On
|
|
6
|
+
RewriteBase /
|
|
7
|
+
|
|
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]
|
|
11
|
+
|
|
12
|
+
# 2. Se il file o la cartella richiesti esistono fisicamente, servili normalmente
|
|
13
|
+
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
|
14
|
+
RewriteCond %{REQUEST_FILENAME} -d
|
|
15
|
+
RewriteRule ^ - [L]
|
|
16
|
+
|
|
17
|
+
# 3. Se non esistono e non siamo in /api, Apache userà l'ErrorDocument 404 sopra
|
|
18
|
+
</IfModule>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<IfModule mod_rewrite.c>
|
|
2
|
+
RewriteEngine On
|
|
3
|
+
RewriteBase /api/
|
|
4
|
+
|
|
5
|
+
# Non processare file reali (immagini, vendor, ecc.)
|
|
6
|
+
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
|
7
|
+
RewriteCond %{REQUEST_FILENAME} -d
|
|
8
|
+
RewriteRule ^ - [L]
|
|
9
|
+
|
|
10
|
+
# Tutto il resto va a index.php
|
|
11
|
+
RewriteRule ^(.*)$ index.php [QSA,L]
|
|
12
|
+
</IfModule>
|