create-berna-stencil 1.0.20 → 1.0.21

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/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  node_modules/
2
2
  out/
3
+ src/api/config.php
3
4
  src/api/core/vendor/
package/bin/create.js CHANGED
@@ -17,19 +17,20 @@ const COPY_TARGETS = [
17
17
 
18
18
  const PROJECT_PACKAGE = {
19
19
  name: path.basename(targetDir),
20
- version: '1.0.20',
20
+ version: '1.0.21',
21
21
  private: true,
22
22
  scripts: {
23
- 'build:css': 'sass src/scss:out/css --no-source-map --style=compressed --quiet',
24
- 'build:js': 'esbuild "src/js/pages/*.js" --bundle --outdir=out/js/pages --minify',
25
- 'build:11ty': 'eleventy',
26
- 'build': 'npm run build:css && npm run build:js && npm run build:11ty',
27
- 'serve:css': 'sass --watch src/scss:out/css --no-source-map --quiet',
28
- 'serve:js': 'esbuild "src/js/pages/*.js" --bundle --outdir=out/js/pages --watch',
29
- 'serve:11ty': 'eleventy --serve --quiet',
30
- 'clean': 'node _tools/cleanOutput.js',
31
- 'serve': 'npm run clean && concurrently "npm run serve:11ty" "npm run serve:css" "npm run serve:js"',
32
- 'assistant': 'node _tools/assistant.js',
23
+ "build:css": "sass src/scss:c:/laragon/www/Berna-Stencil-out/css --no-source-map --style=compressed --quiet",
24
+ "build:js": "esbuild \"src/js/pages/*.js\" --bundle --outdir=c:/laragon/www/Berna-Stencil-out/js/pages --minify",
25
+ "build:11ty": "eleventy",
26
+ "build": "npm run build:css && npm run build:js && npm run build:11ty",
27
+ "serve:css": "sass --watch src/scss:c:/laragon/www/Berna-Stencil-out/css --no-source-map --quiet",
28
+ "serve:js": "esbuild \"src/js/pages/*.js\" --bundle --outdir=c:/laragon/www/Berna-Stencil-out/js/pages --watch",
29
+ "serve:11ty": "eleventy --serve --quiet",
30
+ "clean": "node _tools/cleanOutput.js",
31
+ "serve": "npm run clean && concurrently \"npm run serve:11ty\" \"npm run serve:css\" \"npm run serve:js\"",
32
+ "assistant": "node _tools/assistant.js",
33
+ "postinstall": "cd src/api/core && composer install --quiet"
33
34
  },
34
35
  dependencies: {
35
36
  '@11ty/eleventy': '^3.1.2',
package/package.json CHANGED
@@ -1,72 +1,72 @@
1
- {
2
- "name": "create-berna-stencil",
3
- "version": "1.0.20",
4
- "description": "Eleventy boilerplate with per-page SCSS/JS pipeline, esbuild bundling, multi-framework CSS support and a built-in page management CLI",
5
- "keywords": [
6
- "eleventy",
7
- "11ty",
8
- "boilerplate",
9
- "starter",
10
- "scss",
11
- "esbuild",
12
- "bootstrap",
13
- "bulma",
14
- "foundation",
15
- "uikit",
16
- "static-site",
17
- "nunjucks"
18
- ],
19
- "author": "Michele Garofalo",
20
- "license": "MIT",
21
- "repository": {
22
- "type": "git",
23
- "url": "https://github.com/rhaastrake/berna-stencil"
24
- },
25
- "homepage": "https://github.com/rhaastrake/berna-stencil#readme",
26
- "bugs": {
27
- "url": "https://github.com/rhaastrake/berna-stencil/issues"
28
- },
29
- "bin": {
30
- "create-berna-stencil": "bin/create.js"
31
- },
32
- "files": [
33
- "bin/",
34
- "src/",
35
- "_tools/",
36
- ".eleventy.js",
37
- ".eleventyignore",
38
- ".gitignore",
39
- "README.md"
40
- ],
41
- "engines": {
42
- "node": ">=18.0.0"
43
- },
44
- "dependencies": {
45
- "@11ty/eleventy": "^3.1.2",
46
- "@11ty/eleventy-img": "^6.0.4",
47
- "bootstrap": "^5.3.8",
48
- "bootstrap-icons": "^1.13.1",
49
- "bulma": "^1.0.4",
50
- "foundation-sites": "^6.9.0",
51
- "glob": "^13.0.6",
52
- "uikit": "^3.25.13"
53
- },
54
- "devDependencies": {
55
- "concurrently": "^9.2.1",
56
- "esbuild": "^0.27.3",
57
- "sass": "^1.77.0"
58
- },
59
- "scripts": {
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
- "build:11ty": "eleventy",
63
- "build": "npm run build:css && npm run build:js && npm run build:11ty",
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
- "serve:11ty": "eleventy --serve --quiet",
67
- "clean": "node _tools/cleanOutput.js",
68
- "serve": "npm run clean && concurrently \"npm run serve:11ty\" \"npm run serve:css\" \"npm run serve:js\"",
69
- "assistant": "node _tools/assistant.js",
70
- "postinstall": "cd src/api/core && composer install"
71
- }
1
+ {
2
+ "name": "create-berna-stencil",
3
+ "version": "1.0.21",
4
+ "description": "Eleventy boilerplate with per-page SCSS/JS pipeline, esbuild bundling, multi-framework CSS support and a built-in page management CLI",
5
+ "keywords": [
6
+ "eleventy",
7
+ "11ty",
8
+ "boilerplate",
9
+ "starter",
10
+ "scss",
11
+ "esbuild",
12
+ "bootstrap",
13
+ "bulma",
14
+ "foundation",
15
+ "uikit",
16
+ "static-site",
17
+ "nunjucks"
18
+ ],
19
+ "author": "Michele Garofalo",
20
+ "license": "MIT",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/rhaastrake/berna-stencil"
24
+ },
25
+ "homepage": "https://github.com/rhaastrake/berna-stencil#readme",
26
+ "bugs": {
27
+ "url": "https://github.com/rhaastrake/berna-stencil/issues"
28
+ },
29
+ "bin": {
30
+ "create-berna-stencil": "bin/create.js"
31
+ },
32
+ "files": [
33
+ "bin/",
34
+ "src/",
35
+ "_tools/",
36
+ ".eleventy.js",
37
+ ".eleventyignore",
38
+ ".gitignore",
39
+ "README.md"
40
+ ],
41
+ "engines": {
42
+ "node": ">=18.0.0"
43
+ },
44
+ "dependencies": {
45
+ "@11ty/eleventy": "^3.1.2",
46
+ "@11ty/eleventy-img": "^6.0.4",
47
+ "bootstrap": "^5.3.8",
48
+ "bootstrap-icons": "^1.13.1",
49
+ "bulma": "^1.0.4",
50
+ "foundation-sites": "^6.9.0",
51
+ "glob": "^13.0.6",
52
+ "uikit": "^3.25.13"
53
+ },
54
+ "devDependencies": {
55
+ "concurrently": "^9.2.1",
56
+ "esbuild": "^0.27.3",
57
+ "sass": "^1.77.0"
58
+ },
59
+ "scripts": {
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
+ "build:11ty": "eleventy",
63
+ "build": "npm run build:css && npm run build:js && npm run build:11ty",
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
+ "serve:11ty": "eleventy --serve --quiet",
67
+ "clean": "node _tools/cleanOutput.js",
68
+ "serve": "npm run clean && concurrently \"npm run serve:11ty\" \"npm run serve:css\" \"npm run serve:js\"",
69
+ "assistant": "node _tools/assistant.js",
70
+ "postinstall": "cd src/api/core && composer install --quiet"
71
+ }
72
72
  }
@@ -0,0 +1,27 @@
1
+ <?php
2
+ declare(strict_types=1);
3
+
4
+ if (!defined('CORE_ACCESS')) {
5
+ $errorPage = $_SERVER['DOCUMENT_ROOT'] . '/404.html';
6
+ http_response_code(404);
7
+ if (file_exists($errorPage)) {
8
+ header('Content-Type: text/html; charset=UTF-8');
9
+ echo file_get_contents($errorPage);
10
+ } else {
11
+ echo "404 Not Found";
12
+ }
13
+ exit;
14
+ }
15
+
16
+ return [
17
+ // Configurazioni di base
18
+ 'API_KEY' => 'TOKEN',
19
+ 'CORS_ALLOWED_ORIGINS' => '*',
20
+
21
+ // Configurazioni per l'invio delle Email
22
+ 'MAIL_HOST' => 'smtp.gmail.com',
23
+ 'MAIL_PORT' => 587, // Per i numeri puoi omettere gli apici
24
+ 'MAIL_USERNAME' => 'YOUR_EMAIL',
25
+ 'MAIL_PASSWORD' => 'APP_PASSWORD',
26
+ 'MAIL_TO_ADDRESS' => 'EMAIL_TO_ADDRESS',
27
+ ];
@@ -1,10 +1,16 @@
1
1
  <?php
2
2
  declare(strict_types=1);
3
3
 
4
- // Impedisce l'accesso diretto via URL
5
4
  if (!defined('CORE_ACCESS')) {
6
- http_response_code(403);
7
- die('Accesso diretto non consentito.');
5
+ $errorPage = $_SERVER['DOCUMENT_ROOT'] . '/404.html';
6
+ http_response_code(404);
7
+ if (file_exists($errorPage)) {
8
+ header('Content-Type: text/html; charset=UTF-8');
9
+ echo file_get_contents($errorPage);
10
+ } else {
11
+ echo "404 Not Found";
12
+ }
13
+ exit;
8
14
  }
9
15
 
10
16
  return [