nibula 2.4.6 → 2.4.7

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/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ All notable changes to Nibula are documented here.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.4.7] - 2026-09-04
9
+
10
+ ### Changed
11
+ - **New page and global scripts no longer wrap their code in `DOMContentLoaded`.**
12
+ Scripts are loaded at the end of the body, so the page is already there when
13
+ they run: the wrapper was a precaution that a beginner had to understand before
14
+ being able to ignore it. The documentation explains when to add it back.
15
+ - The TypeScript module template annotates its return type, so the first file a
16
+ TypeScript project opens actually shows TypeScript syntax.
17
+
8
18
  ## [2.4.6] - 2026-08-29
9
19
 
10
20
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nibula",
3
- "version": "2.4.6",
3
+ "version": "2.4.7",
4
4
  "description": "A beginner-friendly static site generator built on Eleventy that stays close to vanilla HTML, CSS and JS — with a page-management CLI, an optional PHP backend, and SEO files generated for you.",
5
5
  "keywords": [
6
6
  "11ty",
@@ -1,7 +1,5 @@
1
1
  // import { initExampleModule } from "./modules/exampleModule.js";
2
2
 
3
- document.addEventListener('DOMContentLoaded', () => {
4
- // initExampleModule();
5
- });
3
+ // initExampleModule();
6
4
 
7
5
  // Global logic here
@@ -1,4 +1,3 @@
1
1
  export function initExampleModule() {
2
- // Module logic here
3
2
  alert("Example module is working!");
4
3
  }
@@ -1,9 +1,7 @@
1
1
  import '../global.js';
2
2
 
3
- // import { initExampleModule } from '../modules/exampleModule';
3
+ // import { initExampleModule } from '../modules/exampleModule.js';
4
4
 
5
- document.addEventListener("DOMContentLoaded", () => {
6
- // initExampleModule();
7
- });
5
+ // initExampleModule();
8
6
 
9
7
  // Page logic here
@@ -1,9 +1,7 @@
1
1
  import '../global.js';
2
2
 
3
- // import { initExampleModule } from '../modules/exampleModule';
3
+ // import { initExampleModule } from '../modules/exampleModule.js';
4
4
 
5
- document.addEventListener("DOMContentLoaded", () => {
6
- // initExampleModule();
7
- });
5
+ // initExampleModule();
8
6
 
9
7
  // Page logic here
@@ -1,7 +1,5 @@
1
- // import { initExampleModule } from "./modules/exampleModule";
1
+ // import { initExampleModule } from '../modules/exampleModule';
2
2
 
3
- document.addEventListener('DOMContentLoaded', () => {
4
- // initExampleModule();
5
- });
3
+ // initExampleModule();
6
4
 
7
5
  // Global logic here
@@ -1,4 +1,3 @@
1
1
  export function initExampleModule(): void {
2
- // Module logic here
3
2
  alert("Example module is working!");
4
3
  }
@@ -2,8 +2,6 @@ import '../global';
2
2
 
3
3
  // import { initExampleModule } from '../modules/exampleModule';
4
4
 
5
- document.addEventListener("DOMContentLoaded", () => {
6
- // initExampleModule();
7
- });
5
+ // initExampleModule();
8
6
 
9
7
  // Page logic here
@@ -2,8 +2,6 @@ import '../global';
2
2
 
3
3
  // import { initExampleModule } from '../modules/exampleModule';
4
4
 
5
- document.addEventListener("DOMContentLoaded", () => {
6
- // initExampleModule();
7
- });
5
+ // initExampleModule();
8
6
 
9
7
  // Page logic here
@@ -1,9 +1,7 @@
1
1
  import '../global.js';
2
2
 
3
- // import { initExampleModule } from '../modules/exampleModule';
3
+ // import { initExampleModule } from '../modules/exampleModule.js';
4
4
 
5
- document.addEventListener("DOMContentLoaded", () => {
6
- // initExampleModule();
7
- });
5
+ // initExampleModule();
8
6
 
9
7
  // Page logic here
@@ -2,8 +2,6 @@ import '../global';
2
2
 
3
3
  // import { initExampleModule } from '../modules/exampleModule';
4
4
 
5
- document.addEventListener("DOMContentLoaded", () => {
6
- // initExampleModule();
7
- });
5
+ // initExampleModule();
8
6
 
9
7
  // Page logic here