nibula 1.2.4 → 1.2.5
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 +81 -81
- package/.eleventyignore +3 -3
- package/.github/workflows/publish.yml +37 -0
- package/CHANGELOG.md +166 -148
- package/LICENSE +169 -169
- package/NOTICE +4 -4
- package/README.md +120 -123
- package/bin/create.js +507 -507
- package/bin/nibula.js +317 -305
- package/docs/Assistant CLI.md +65 -65
- package/docs/Backend.md +295 -295
- package/docs/Components.md +84 -84
- package/docs/Creating pages.md +64 -64
- package/docs/Deploy.md +189 -189
- package/docs/Head and SEO.md +138 -138
- package/docs/Javascript.md +50 -50
- package/docs/Styling with SCSS.md +141 -141
- package/nginx.conf +75 -75
- package/package.json +1 -1
- package/src/backend/.htaccess +6 -6
- package/src/backend/_core/composer.json +5 -5
- package/src/backend/_core/composer.lock +492 -492
- package/src/backend/_core/index.js +267 -267
- package/src/backend/_core/index.php +147 -147
- package/src/backend/_core/init.js +52 -52
- package/src/backend/_core/init.php +33 -33
- package/src/backend/_core/modules/RateLimiter.js +58 -58
- package/src/backend/_core/modules/RateLimiter.php +30 -30
- package/src/backend/_core/modules/Response.js +59 -59
- package/src/backend/_core/modules/Response.php +48 -48
- package/src/backend/api/protected/example-protected.js +23 -23
- package/src/backend/api/protected/example-protected.php +16 -16
- package/src/backend/api/public/example-public.js +24 -24
- package/src/backend/api/public/example-public.php +16 -16
- package/src/backend/backend-node.service.example +30 -30
- package/src/backend/database/Database.js +46 -46
- package/src/backend/database/Database.php +23 -23
- package/src/backend/example.config.js +37 -37
- package/src/backend/example.config.php +27 -27
- package/src/backend/package.json +18 -18
- package/src/backend/web.config +16 -16
- package/src/frontend/.htaccess +51 -51
- package/src/frontend/404.njk +17 -17
- package/src/frontend/assets/brand/favicon.svg +54 -54
- package/src/frontend/assets/brand/logo.svg +54 -54
- package/src/frontend/components/global/footer.njk +25 -25
- package/src/frontend/components/global/header.njk +6 -6
- package/src/frontend/components/welcome.njk +114 -114
- package/src/frontend/data/site.json +48 -48
- package/src/frontend/index.njk +8 -8
- package/src/frontend/js/modules/exampleModule.js +2 -2
- package/src/frontend/js/pages/404.js +6 -6
- package/src/frontend/js/pages/homepage.js +6 -6
- package/src/frontend/layouts/base.njk +132 -132
- package/src/frontend/layouts/page-components.njk +13 -13
- package/src/frontend/llms.njk +17 -17
- package/src/frontend/robots.njk +7 -7
- package/src/frontend/scss/modules/_animations.scss +24 -24
- package/src/frontend/scss/modules/_footer.scss +27 -27
- package/src/frontend/scss/modules/_global.scss +47 -47
- package/src/frontend/scss/modules/_header.scss +27 -27
- package/src/frontend/scss/modules/_mobile.scss +29 -29
- package/src/frontend/scss/modules/_root.scss +34 -34
- package/src/frontend/scss/modules/_typography.scss +14 -14
- package/src/frontend/scss/modules/frameworks/_bootstrap.scss +109 -109
- package/src/frontend/scss/modules/frameworks/_bulma.scss +108 -108
- package/src/frontend/scss/modules/frameworks/_foundation.scss +138 -139
- package/src/frontend/scss/modules/frameworks/_uikit.scss +109 -109
- package/src/frontend/scss/pages/404.scss +27 -27
- package/src/frontend/scss/pages/homepage.scss +22 -22
- package/src/frontend/sitemap.njk +17 -17
- package/src/frontend/ts/modules/exampleModule.ts +2 -2
- package/src/frontend/ts/pages/404.ts +6 -6
- package/src/frontend/ts/pages/homepage.ts +6 -6
- package/src/frontend/web.config +55 -55
- package/tools/config/messages.json +3 -1
- package/tools/res/templates/template.js +6 -6
- package/tools/res/templates/template.njk +8 -8
- package/tools/res/templates/template.scss +22 -22
- package/tools/res/templates/template.ts +6 -6
- package/tsconfig.json +24 -24
package/docs/Assistant CLI.md
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
# Assistant CLI
|
|
2
|
-
|
|
3
|
-
> Examples use JavaScript, but everything applies equally to TypeScript. The only difference is the file extension (`.ts` instead of `.js`), that imports do **not** include the extension, and that paths use `src/frontend/ts/` instead of `src/frontend/js/`.
|
|
4
|
-
|
|
5
|
-
An interactive CLI to manage pages without touching files manually.
|
|
6
|
-
|
|
7
|
-
Run it from anywhere inside a project:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
nib cli
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Menu
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
1. Create page
|
|
17
|
-
2. Remove page
|
|
18
|
-
3. Rename page
|
|
19
|
-
4. Configure output path
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Use `CTRL/CMD + C` (or `CTRL + D`) to exit.
|
|
23
|
-
|
|
24
|
-
## Create page
|
|
25
|
-
|
|
26
|
-
Enter a page name in any format — the CLI converts it to kebab-case automatically.
|
|
27
|
-
|
|
28
|
-
For a page named `my-page`, the following files are created:
|
|
29
|
-
|
|
30
|
-
| File | Purpose |
|
|
31
|
-
|---|---|
|
|
32
|
-
| `src/frontend/scss/pages/myPage.scss` | SCSS entry point |
|
|
33
|
-
| `src/frontend/js/pages/myPage.js` | JS entry point |
|
|
34
|
-
| `src/frontend/routes/my-page.njk` | Nunjucks template |
|
|
35
|
-
|
|
36
|
-
It also adds an `elif` block in `page-components.njk` and a stub entry in `site.json`:
|
|
37
|
-
|
|
38
|
-
```json
|
|
39
|
-
"myPage": {
|
|
40
|
-
"seo": {
|
|
41
|
-
"title": "My page",
|
|
42
|
-
"description": "Description",
|
|
43
|
-
"keywords": "",
|
|
44
|
-
"noindex": false,
|
|
45
|
-
"canonical": ""
|
|
46
|
-
},
|
|
47
|
-
"cdn": {
|
|
48
|
-
"css": [],
|
|
49
|
-
"js": []
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Remove page
|
|
55
|
-
|
|
56
|
-
Deletes all source files for the page and cleans up the output directory, `page-components.njk`, and `site.json`.
|
|
57
|
-
|
|
58
|
-
## Rename page
|
|
59
|
-
|
|
60
|
-
Renames all three source files, updates the `elif` block in `page-components.njk`, and renames the record in `site.json` while preserving all existing fields.
|
|
61
|
-
|
|
62
|
-
## Configure output path
|
|
63
|
-
|
|
64
|
-
Updates the output directory across `.eleventy.js` and all relevant `package.json` scripts in one shot. The old output folder is deleted automatically.
|
|
65
|
-
|
|
1
|
+
# Assistant CLI
|
|
2
|
+
|
|
3
|
+
> Examples use JavaScript, but everything applies equally to TypeScript. The only difference is the file extension (`.ts` instead of `.js`), that imports do **not** include the extension, and that paths use `src/frontend/ts/` instead of `src/frontend/js/`.
|
|
4
|
+
|
|
5
|
+
An interactive CLI to manage pages without touching files manually.
|
|
6
|
+
|
|
7
|
+
Run it from anywhere inside a project:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
nib cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Menu
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
1. Create page
|
|
17
|
+
2. Remove page
|
|
18
|
+
3. Rename page
|
|
19
|
+
4. Configure output path
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Use `CTRL/CMD + C` (or `CTRL + D`) to exit.
|
|
23
|
+
|
|
24
|
+
## Create page
|
|
25
|
+
|
|
26
|
+
Enter a page name in any format — the CLI converts it to kebab-case automatically.
|
|
27
|
+
|
|
28
|
+
For a page named `my-page`, the following files are created:
|
|
29
|
+
|
|
30
|
+
| File | Purpose |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `src/frontend/scss/pages/myPage.scss` | SCSS entry point |
|
|
33
|
+
| `src/frontend/js/pages/myPage.js` | JS entry point |
|
|
34
|
+
| `src/frontend/routes/my-page.njk` | Nunjucks template |
|
|
35
|
+
|
|
36
|
+
It also adds an `elif` block in `page-components.njk` and a stub entry in `site.json`:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
"myPage": {
|
|
40
|
+
"seo": {
|
|
41
|
+
"title": "My page",
|
|
42
|
+
"description": "Description",
|
|
43
|
+
"keywords": "",
|
|
44
|
+
"noindex": false,
|
|
45
|
+
"canonical": ""
|
|
46
|
+
},
|
|
47
|
+
"cdn": {
|
|
48
|
+
"css": [],
|
|
49
|
+
"js": []
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Remove page
|
|
55
|
+
|
|
56
|
+
Deletes all source files for the page and cleans up the output directory, `page-components.njk`, and `site.json`.
|
|
57
|
+
|
|
58
|
+
## Rename page
|
|
59
|
+
|
|
60
|
+
Renames all three source files, updates the `elif` block in `page-components.njk`, and renames the record in `site.json` while preserving all existing fields.
|
|
61
|
+
|
|
62
|
+
## Configure output path
|
|
63
|
+
|
|
64
|
+
Updates the output directory across `.eleventy.js` and all relevant `package.json` scripts in one shot. The old output folder is deleted automatically.
|
|
65
|
+
|
|
66
66
|
> ⚠️ `homepage` and `404` are protected — they cannot be created, removed, or renamed via the CLI.
|