buntic 0.3.0 → 0.3.1
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/LICENSE +1 -1
- package/README.md +38 -38
- package/dist/cli.js +118 -123
- package/dist/config.d.ts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +122 -128
- package/dist/router/routes.d.ts +1 -1
- package/dist/runtime.d.ts +8 -9
- package/dist/server/dev-helpers.d.ts +1 -1
- package/dist/storage/oras/adapter.d.ts +2 -2
- package/dist/template/scoped-css.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils/html.d.ts +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/package.json +7 -7
- package/templates/blank/_gitignore +2 -2
- package/templates/blank/{bustatic.config.ts → buntic.config.ts} +2 -2
- package/templates/blank/src/pages/index.html +2 -2
- package/templates/blank/tsconfig.json +4 -9
- package/templates/simple/README.md +6 -6
- package/templates/simple/_gitignore +2 -2
- package/templates/simple/{bustatic.config.ts → buntic.config.ts} +2 -2
- package/templates/simple/src/components/footer.html +1 -1
- package/templates/simple/src/data/site.json +3 -3
- package/templates/simple/src/pages/about.html +1 -1
- package/templates/simple/src/pages/contact.html +1 -1
- package/templates/simple/tsconfig.json +4 -9
- package/templates/skills/{bustatic → buntic}/SKILL.md +33 -33
- package/templates/skills/{bustatic → buntic}/examples/README.md +4 -4
package/dist/router/routes.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare function buildCleanUrl(patternRelPath: string, params: Record<str
|
|
|
40
40
|
relOutputPath: string;
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
|
-
* Resolves all routes (static and dynamic) in a
|
|
43
|
+
* Resolves all routes (static and dynamic) in a Buntic project.
|
|
44
44
|
* Enforces co-located loaders, executes them, validates parameters, and prevents URL collisions.
|
|
45
45
|
*/
|
|
46
46
|
export declare function resolveAllRoutes(config: ResolvedConfig, globalData: Record<string, unknown>, options?: {
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Resolves the root directory of the installed/running
|
|
2
|
+
* Resolves the root directory of the installed/running buntic package.
|
|
3
3
|
*/
|
|
4
4
|
export declare function getPackageRoot(): string;
|
|
5
5
|
/**
|
|
6
|
-
* Returns the runtime entry point for the currently running
|
|
6
|
+
* Returns the runtime entry point for the currently running buntic package.
|
|
7
7
|
*/
|
|
8
8
|
export declare function getSelfEntryPath(): string;
|
|
9
9
|
/**
|
|
10
|
-
* Checks whether a project directory (or any ancestor) has a local
|
|
11
|
-
* node_modules/bun-bustatic or node_modules/bustatic installation.
|
|
10
|
+
* Checks whether a project directory (or any ancestor) has a local node_modules/buntic installation.
|
|
12
11
|
*/
|
|
13
|
-
export declare function
|
|
12
|
+
export declare function hasLocalBunticPackage(startDir: string): boolean;
|
|
14
13
|
/**
|
|
15
14
|
* Registers a runtime Bun.plugin so projects without package.json / node_modules
|
|
16
|
-
* can import from "
|
|
17
|
-
*
|
|
15
|
+
* can import from "buntic" (e.g. buntic.config.ts, storage/*.ts) when executed
|
|
16
|
+
* via a globally installed buntic CLI.
|
|
18
17
|
*/
|
|
19
|
-
export declare function
|
|
18
|
+
export declare function registerBunticModuleResolver(projectDir?: string): void;
|
|
20
19
|
/**
|
|
21
|
-
* Copies
|
|
20
|
+
* Copies Buntic's .d.ts declarations into .buntic/types/ so TypeScript / VS Code
|
|
22
21
|
* provides full autocomplete and type checking in zero-package.json projects via tsconfig paths.
|
|
23
22
|
*/
|
|
24
23
|
export declare function syncProjectTypes(projectRoot: string): boolean;
|
|
@@ -2,7 +2,7 @@ import type { PageRouteInfo, PageSeo, ResolvedConfig } from "../types.js";
|
|
|
2
2
|
import type { PhotoProcessor } from "../assets/photo-tag.js";
|
|
3
3
|
import type { SeoMetadataEngine } from "../seo/metadata.js";
|
|
4
4
|
import type { TemplateEngine } from "../template/engine.js";
|
|
5
|
-
export declare const LIVE_RELOAD_SCRIPT = "\n<script id=\"
|
|
5
|
+
export declare const LIVE_RELOAD_SCRIPT = "\n<script id=\"__buntic_live_reload\">\n (() => {\n const protocol = location.protocol === 'https:' ? 'wss:' : 'ws:';\n const ws = new WebSocket(`${protocol}//${location.host}/_buntic/ws`);\n ws.onmessage = (event) => {\n if (event.data === 'reload') {\n console.log('[buntic] Change detected. Reloading...');\n location.reload();\n }\n };\n ws.onclose = () => {\n setTimeout(() => location.reload(), 1500);\n };\n })();\n</script>\n";
|
|
6
6
|
/**
|
|
7
7
|
* Renders an HTML page through TemplateEngine, PhotoProcessor, SeoMetadataEngine,
|
|
8
8
|
* and appends the dev live-reload WebSocket snippet.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { StorageLoaderFn } from "../../types.js";
|
|
2
2
|
import type { OrasStorageOptions } from "./types.js";
|
|
3
3
|
/**
|
|
4
|
-
* Creates a
|
|
4
|
+
* Creates a Buntic storage loader function backed by an OCI Registry / ORAS.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```ts
|
|
8
8
|
* // storage/oci.ts
|
|
9
|
-
* import { createOrasStorage } from "
|
|
9
|
+
* import { createOrasStorage } from "buntic";
|
|
10
10
|
*
|
|
11
11
|
* export default createOrasStorage({
|
|
12
12
|
* hostname: "localhost:5000",
|
package/dist/types.d.ts
CHANGED
package/dist/utils/html.d.ts
CHANGED
package/dist/utils/logger.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Standardized console logging and error formatting utilities for
|
|
2
|
+
* Standardized console logging and error formatting utilities for Buntic.
|
|
3
3
|
*/
|
|
4
4
|
export declare function getErrorMessage(err: unknown): string;
|
|
5
5
|
export declare function logWarn(message: string, label?: string): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buntic",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Zero-dependency, blazing-fast static site generator native to Bun",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"bin": {
|
|
15
|
-
"
|
|
15
|
+
"buntic": "./dist/cli.js"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"typecheck": "bunx tsc --noEmit",
|
|
26
26
|
"test": "bun test",
|
|
27
27
|
"prepublishOnly": "bun run build:pkg && bun test",
|
|
28
|
-
"dev": "bun ./bin/
|
|
29
|
-
"build": "bun ./bin/
|
|
28
|
+
"dev": "bun ./bin/buntic.ts dev examples/simple --port 3333",
|
|
29
|
+
"build": "bun ./bin/buntic.ts build examples/simple"
|
|
30
30
|
},
|
|
31
31
|
"keywords": [
|
|
32
32
|
"bun",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"license": "MIT",
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
43
|
-
"url": "git+https://github.com/jloons/
|
|
43
|
+
"url": "git+https://github.com/jloons/buntic.git"
|
|
44
44
|
},
|
|
45
|
-
"homepage": "https://github.com/jloons/
|
|
45
|
+
"homepage": "https://github.com/jloons/buntic#readme",
|
|
46
46
|
"bugs": {
|
|
47
|
-
"url": "https://github.com/jloons/
|
|
47
|
+
"url": "https://github.com/jloons/buntic/issues"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
|
50
50
|
"bun": ">=1.4.0"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineConfig } from "
|
|
1
|
+
import { defineConfig } from "buntic";
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
4
|
port: 3000,
|
|
@@ -6,7 +6,7 @@ export default defineConfig({
|
|
|
6
6
|
site: {
|
|
7
7
|
url: "https://example.com",
|
|
8
8
|
title: "Mi Sitio",
|
|
9
|
-
description: "Sitio web estático generado con
|
|
9
|
+
description: "Sitio web estático generado con Buntic",
|
|
10
10
|
},
|
|
11
11
|
seo: {
|
|
12
12
|
sitemap: true,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<layout src="../layouts/main.html">
|
|
2
2
|
<seo
|
|
3
3
|
title="Inicio | Mi Sitio"
|
|
4
|
-
description="Sitio web estático generado con
|
|
4
|
+
description="Sitio web estático generado con Buntic."
|
|
5
5
|
/>
|
|
6
6
|
|
|
7
7
|
<section class="hero">
|
|
8
|
-
<h1>Hola desde
|
|
8
|
+
<h1>Hola desde Buntic</h1>
|
|
9
9
|
<p>Edita <code>src/pages/index.html</code> para empezar a construir tu sitio.</p>
|
|
10
10
|
</section>
|
|
11
11
|
</layout>
|
|
@@ -11,16 +11,11 @@
|
|
|
11
11
|
"skipLibCheck": true,
|
|
12
12
|
"forceConsistentCasingInFileNames": true,
|
|
13
13
|
"paths": {
|
|
14
|
-
"
|
|
15
|
-
"./node_modules/
|
|
16
|
-
"./.
|
|
17
|
-
],
|
|
18
|
-
"bustatic": [
|
|
19
|
-
"./node_modules/bun-bustatic/dist/index.d.ts",
|
|
20
|
-
"./node_modules/bustatic/dist/index.d.ts",
|
|
21
|
-
"./.bustatic/types/index.d.ts"
|
|
14
|
+
"buntic": [
|
|
15
|
+
"./node_modules/buntic/dist/index.d.ts",
|
|
16
|
+
"./.buntic/types/index.d.ts"
|
|
22
17
|
]
|
|
23
18
|
}
|
|
24
19
|
},
|
|
25
|
-
"include": ["src/**/*", "
|
|
20
|
+
"include": ["src/**/*", "buntic.config.ts"]
|
|
26
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# ⚡
|
|
1
|
+
# ⚡ Buntic Simple
|
|
2
2
|
|
|
3
|
-
Sitio multipágina estático creado con **
|
|
3
|
+
Sitio multipágina estático creado con **Buntic** (sin `package.json` ni `node_modules`).
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@ mi-sitio/
|
|
|
15
15
|
│ ├── data/ # site.json, features.json
|
|
16
16
|
│ ├── styles/ # main.css
|
|
17
17
|
│ └── public/ # robots.txt
|
|
18
|
-
├──
|
|
18
|
+
├── buntic.config.ts
|
|
19
19
|
└── tsconfig.json
|
|
20
20
|
```
|
|
21
21
|
|
|
@@ -25,11 +25,11 @@ mi-sitio/
|
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
# Servidor de desarrollo con live-reload
|
|
28
|
-
|
|
28
|
+
buntic dev
|
|
29
29
|
|
|
30
30
|
# Compilar para producción en dist/
|
|
31
|
-
|
|
31
|
+
buntic build
|
|
32
32
|
|
|
33
33
|
# Limpiar dist/ y caché
|
|
34
|
-
|
|
34
|
+
buntic clean
|
|
35
35
|
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineConfig } from "
|
|
1
|
+
import { defineConfig } from "buntic";
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
4
|
port: 3000,
|
|
@@ -6,6 +6,6 @@ export default defineConfig({
|
|
|
6
6
|
site: {
|
|
7
7
|
url: "https://misitio.com",
|
|
8
8
|
title: "Mi Proyecto",
|
|
9
|
-
description: "Sitio web generado con
|
|
9
|
+
description: "Sitio web generado con Buntic"
|
|
10
10
|
}
|
|
11
11
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"title": "
|
|
3
|
-
"description": "Ejemplo estático sencillo y moderno creado con
|
|
2
|
+
"title": "Buntic Simple",
|
|
3
|
+
"description": "Ejemplo estático sencillo y moderno creado con Buntic",
|
|
4
4
|
"year": 2026,
|
|
5
|
-
"author": "Equipo
|
|
5
|
+
"author": "Equipo Buntic",
|
|
6
6
|
"navLinks": [
|
|
7
7
|
{ "label": "Inicio", "url": "/" },
|
|
8
8
|
{ "label": "Acerca de", "url": "/about" },
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<article>
|
|
5
5
|
<h1>Acerca de este proyecto</h1>
|
|
6
6
|
<p>
|
|
7
|
-
Este es un ejemplo simple y completamente estático generado con <strong>
|
|
7
|
+
Este es un ejemplo simple y completamente estático generado con <strong>Buntic</strong>,
|
|
8
8
|
demostrando la estructura de carpetas <code>src/</code> y componentes modulares.
|
|
9
9
|
</p>
|
|
10
10
|
<br>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<p>¿Tienes dudas o comentarios? Puedes encontrarnos en:</p>
|
|
7
7
|
<br>
|
|
8
8
|
<ul>
|
|
9
|
-
<li>GitHub: <a href="https://github.com" target="_blank">Repositorio de
|
|
9
|
+
<li>GitHub: <a href="https://github.com" target="_blank">Repositorio de Buntic</a></li>
|
|
10
10
|
<li>Correo: contacto@example.com</li>
|
|
11
11
|
</ul>
|
|
12
12
|
</article>
|
|
@@ -11,16 +11,11 @@
|
|
|
11
11
|
"skipLibCheck": true,
|
|
12
12
|
"forceConsistentCasingInFileNames": true,
|
|
13
13
|
"paths": {
|
|
14
|
-
"
|
|
15
|
-
"./node_modules/
|
|
16
|
-
"./.
|
|
17
|
-
],
|
|
18
|
-
"bustatic": [
|
|
19
|
-
"./node_modules/bun-bustatic/dist/index.d.ts",
|
|
20
|
-
"./node_modules/bustatic/dist/index.d.ts",
|
|
21
|
-
"./.bustatic/types/index.d.ts"
|
|
14
|
+
"buntic": [
|
|
15
|
+
"./node_modules/buntic/dist/index.d.ts",
|
|
16
|
+
"./.buntic/types/index.d.ts"
|
|
22
17
|
]
|
|
23
18
|
}
|
|
24
19
|
},
|
|
25
|
-
"include": ["src/**/*", "
|
|
20
|
+
"include": ["src/**/*", "buntic.config.ts"]
|
|
26
21
|
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: buntic
|
|
3
3
|
description: >-
|
|
4
4
|
Guía experta para crear, desarrollar, compilar y mantener sitios web estáticos utilizando
|
|
5
|
-
|
|
5
|
+
Buntic, el generador de sitios estáticos de cero dependencias externas nativo para Bun.
|
|
6
6
|
Activar cuando el usuario pida crear o modificar páginas, layouts, componentes, loaders de datos
|
|
7
7
|
dinámicos (.data.ts), optimización de imágenes (<photo>), metadatos SEO (<seo>), Web Components,
|
|
8
|
-
estilos scoped o loaders de almacenamiento (storage/*.ts) en un proyecto
|
|
8
|
+
estilos scoped o loaders de almacenamiento (storage/*.ts) en un proyecto Buntic.
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# ⚡ Skill: Desarrollo de Sitios con
|
|
11
|
+
# ⚡ Skill: Desarrollo de Sitios con Buntic
|
|
12
12
|
|
|
13
|
-
Esta skill proporciona las directrices maestras, sintaxis declarativa y reglas de arquitectura para desarrollar sitios web estáticos de máximo rendimiento con **
|
|
13
|
+
Esta skill proporciona las directrices maestras, sintaxis declarativa y reglas de arquitectura para desarrollar sitios web estáticos de máximo rendimiento con **Buntic**.
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
## 🛑 Reglas de Oro de
|
|
17
|
+
## 🛑 Reglas de Oro de Buntic
|
|
18
18
|
|
|
19
|
-
1. **Cero Dependencias Externas ni `package.json` obligatorio:** No instales paquetes de npm (`sharp`, `@aws-sdk`, `pg`, `ioredis`, `better-sqlite3`, etc.). Utiliza exclusivamente las APIs nativas de Bun (`>=1.4.0`: `Bun.Image`, `Bun.S3Client`, `bun:sqlite`, `Bun.sql`, `RedisClient`, `Bun.build`) y los módulos integrados de
|
|
19
|
+
1. **Cero Dependencias Externas ni `package.json` obligatorio:** No instales paquetes de npm (`sharp`, `@aws-sdk`, `pg`, `ioredis`, `better-sqlite3`, etc.). Utiliza exclusivamente las APIs nativas de Bun (`>=1.4.0`: `Bun.Image`, `Bun.S3Client`, `bun:sqlite`, `Bun.sql`, `RedisClient`, `Bun.build`) y los módulos integrados de Buntic (`defineConfig`, `createOrasStorage`, `OrasClient`). Los proyectos creados con `buntic init` funcionan directamente con el CLI global y solo necesitan `tsconfig.json` (los tipos se sincronizan automáticamente en `.buntic/types/`).
|
|
20
20
|
2. **URLs Limpias por Archivo:** Cada archivo en `pages/` genera una URL limpia sin extensión `.html` (ej. `pages/acerca.html` → `/acerca` → `dist/acerca/index.html`).
|
|
21
21
|
3. **Usa `&` para estilizar el elemento raíz en Scoped CSS:** Tanto en `<style scoped>` como en archivos `.css` hermanos (`.html` + `.css`), todo selector **sin `&`** (o `:host`) se compila como descendiente (`.bs-xxxx .clase`) y **NO aplica al elemento raíz**. Para estilizar la raíz o sus estados escribe siempre `& { ... }`, `&:hover { ... }`, `&:hover .hijo { ... }` o `&.activo { ... }` — nunca `.clase-raiz { ... }`.
|
|
22
22
|
4. **Regla 1:1 de Web Components:** Un Web Component por archivo (`.ts` o `.js`). El nombre del archivo debe coincidir de forma idéntica con el tag Custom Element (`counter-button.ts` → `<counter-button>`). Pueden anidarse entre sí con expansión recursiva de Declarative Shadow DOM (DSD).
|
|
23
23
|
5. **Espacios de Nombres Reservados y Acceso a Loaders:** `params`, `props`, `env`, `seo`, `feed`. No los uses como identificadores en `data/*.json`. En plantillas HTML, los datos devueltos por un loader `.data.ts` (estático o dinámico) se consumen siempre bajo `props.*` (ej. `{{ props.product.name }}`, `<each in="props.featured">`, `{{ props.page.currentPage }}`) y los parámetros de ruta bajo `params.*`.
|
|
24
24
|
6. **No uses `<img>` crudo cuando optimices ni `<photo>` para SVG:** Usa `<photo>` exclusivamente para imágenes rasterizadas (compresión WebP, dimensiones anti-CLS automáticas y `srcset`). Para gráficos vectoriales SVG usa `<component src="...svg" />` cuando necesites estilizarlos inline (colores vía `currentColor`, clases o accesibilidad) o `<img src="/icono.svg">` apuntando a `public/` para SVGs estáticos externos.
|
|
25
|
-
7. **No dupliques metadatos en `<head>`:** Usa la etiqueta `<seo>` en la página o el objeto `seo` en el loader hermano para que
|
|
25
|
+
7. **No dupliques metadatos en `<head>`:** Usa la etiqueta `<seo>` en la página o el objeto `seo` en el loader hermano para que Buntic genere los metatags OpenGraph, Twitter y canonical consolidados.
|
|
26
26
|
8. **Tokens de color en variables CSS:** Centraliza colores en un archivo dedicado (ej. `src/styles/colors.css` importado con `@import "./colors.css";` desde `src/styles/main.css`) y evita colores hardcodeados en componentes y páginas.
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
30
|
## 📁 Estructura Estándar de un Proyecto
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Buntic detecta automáticamente si el proyecto utiliza la estructura moderna `src/` (recomendada) o una estructura plana en la raíz del proyecto:
|
|
33
33
|
|
|
34
34
|
```text
|
|
35
35
|
mi-proyecto/
|
|
@@ -66,7 +66,7 @@ mi-proyecto/
|
|
|
66
66
|
├── docs/ # Documentación técnica del proyecto (opcional)
|
|
67
67
|
├── scripts/ # Scripts de mantenimiento o utilidades (opcional)
|
|
68
68
|
├── dist/ # Directorio de salida generado por la compilación
|
|
69
|
-
└──
|
|
69
|
+
└── buntic.config.ts # Configuración del sitio (site, seo, feeds)
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
> [!TIP]
|
|
@@ -196,7 +196,7 @@ Inyecta en `<head>` el `<title>`, `<link rel="canonical">`, OpenGraph y Twitter
|
|
|
196
196
|
## 📊 Catálogo de Loaders de Datos (`.data.ts`)
|
|
197
197
|
|
|
198
198
|
### Loader Co-ubicado para Página Estática (`pages/index.data.ts`)
|
|
199
|
-
Se ejecuta tanto en `
|
|
199
|
+
Se ejecuta tanto en `buntic dev` (con recarga en vivo al editar) como en `buntic build`:
|
|
200
200
|
```ts
|
|
201
201
|
export default async function({ data, env }) {
|
|
202
202
|
const products = data.products || [];
|
|
@@ -262,7 +262,7 @@ En `[page].html`, consume `props.page`: `<each in="props.page.data">`, `{{ props
|
|
|
262
262
|
### Opción A: OCI Registry / ORAS (`storage/oci.ts`, Recomendado)
|
|
263
263
|
Cliente nativo sin dependencias para Docker Registry v2/v3 y OCI Distribution con soporte de tags e inmutabilidad por digest SHA-256:
|
|
264
264
|
```ts
|
|
265
|
-
import { createOrasStorage } from "
|
|
265
|
+
import { createOrasStorage } from "buntic";
|
|
266
266
|
|
|
267
267
|
export default createOrasStorage({
|
|
268
268
|
hostname: process.env.OCI_REGISTRY_HOST || "localhost:5000",
|
|
@@ -297,14 +297,14 @@ export default async function getAsset(key: string) {
|
|
|
297
297
|
};
|
|
298
298
|
}
|
|
299
299
|
```
|
|
300
|
-
Si existen múltiples loaders en `storage/`, define `defaultStorage` en `
|
|
300
|
+
Si existen múltiples loaders en `storage/`, define `defaultStorage` en `buntic.config.ts` o usa el atributo `storage="oci"` / `storage="s3"` en `<photo>`.
|
|
301
301
|
|
|
302
302
|
---
|
|
303
303
|
|
|
304
|
-
## ⚙️ Archivo de Configuración (`
|
|
304
|
+
## ⚙️ Archivo de Configuración (`buntic.config.ts`)
|
|
305
305
|
|
|
306
306
|
```ts
|
|
307
|
-
import { defineConfig } from "
|
|
307
|
+
import { defineConfig } from "buntic";
|
|
308
308
|
|
|
309
309
|
export default defineConfig({
|
|
310
310
|
port: 3000,
|
|
@@ -314,7 +314,7 @@ export default defineConfig({
|
|
|
314
314
|
site: {
|
|
315
315
|
url: "https://misitio.com",
|
|
316
316
|
title: "Mi Proyecto",
|
|
317
|
-
description: "Sitio web generado con
|
|
317
|
+
description: "Sitio web generado con Buntic",
|
|
318
318
|
},
|
|
319
319
|
seo: {
|
|
320
320
|
sitemap: true, // dist/sitemap.xml
|
|
@@ -333,12 +333,12 @@ export default defineConfig({
|
|
|
333
333
|
|
|
334
334
|
| Comando | Descripción |
|
|
335
335
|
| :--- | :--- |
|
|
336
|
-
| `
|
|
337
|
-
| `
|
|
338
|
-
| `
|
|
339
|
-
| `
|
|
340
|
-
| `
|
|
341
|
-
| `
|
|
336
|
+
| `buntic init [dir]` | Inicializa un nuevo proyecto (`--template blank\|simple`, por defecto `blank`, sin `package.json`) |
|
|
337
|
+
| `buntic dev [dir]` | Servidor de desarrollo en `http://localhost:3000` con live-reload |
|
|
338
|
+
| `buntic dev --clean-cache` | Servidor de desarrollo purgando caché previo de imágenes |
|
|
339
|
+
| `buntic build [dir]` | Compila todo el sitio para producción en `dist/` |
|
|
340
|
+
| `buntic build --clean-cache` | Compila purgando caché inmutable previo |
|
|
341
|
+
| `buntic clean [dir]` | Elimina `dist/` y `.buntic/cache/` |
|
|
342
342
|
| `bun test` | Ejecuta la suite de pruebas del proyecto |
|
|
343
343
|
|
|
344
344
|
---
|
|
@@ -346,14 +346,14 @@ export default defineConfig({
|
|
|
346
346
|
## 📖 Referencias Detalladas
|
|
347
347
|
|
|
348
348
|
Para consultas profundas sobre subsistemas específicos, revisa la documentación oficial:
|
|
349
|
-
- 📑 [Plantillas y Sintaxis](https://github.com/jloons/
|
|
350
|
-
- 🎨 [Estilos Scoped y Grafo CSS](https://github.com/jloons/
|
|
351
|
-
- 🧩 [Web Components y Shadow DOM](https://github.com/jloons/
|
|
352
|
-
- 🗺️ [Enrutamiento y Rutas Dinámicas](https://github.com/jloons/
|
|
353
|
-
- 📊 [Datos, Loaders y Entorno](https://github.com/jloons/
|
|
354
|
-
- 🗄️ [Motores SQL y Redis Nativos](https://github.com/jloons/
|
|
355
|
-
- 📑 [Paginación Automática](https://github.com/jloons/
|
|
356
|
-
- 🖼️ [Optimización de Imágenes](https://github.com/jloons/
|
|
357
|
-
- 🗄️ [Storage Loaders (OCI Registry / ORAS y S3)](https://github.com/jloons/
|
|
358
|
-
- 🔍 [Suite SEO y Feeds](https://github.com/jloons/
|
|
359
|
-
- ⌨️ [Referencia del CLI](https://github.com/jloons/
|
|
349
|
+
- 📑 [Plantillas y Sintaxis](https://github.com/jloons/buntic/blob/main/docs/templating.md)
|
|
350
|
+
- 🎨 [Estilos Scoped y Grafo CSS](https://github.com/jloons/buntic/blob/main/docs/scoped-css.md)
|
|
351
|
+
- 🧩 [Web Components y Shadow DOM](https://github.com/jloons/buntic/blob/main/docs/web-components.md)
|
|
352
|
+
- 🗺️ [Enrutamiento y Rutas Dinámicas](https://github.com/jloons/buntic/blob/main/docs/routing-and-pages.md)
|
|
353
|
+
- 📊 [Datos, Loaders y Entorno](https://github.com/jloons/buntic/blob/main/docs/data-and-loaders.md)
|
|
354
|
+
- 🗄️ [Motores SQL y Redis Nativos](https://github.com/jloons/buntic/blob/main/docs/databases-sql.md)
|
|
355
|
+
- 📑 [Paginación Automática](https://github.com/jloons/buntic/blob/main/docs/pagination.md)
|
|
356
|
+
- 🖼️ [Optimización de Imágenes](https://github.com/jloons/buntic/blob/main/docs/assets-and-images.md)
|
|
357
|
+
- 🗄️ [Storage Loaders (OCI Registry / ORAS y S3)](https://github.com/jloons/buntic/blob/main/docs/storage-loaders.md)
|
|
358
|
+
- 🔍 [Suite SEO y Feeds](https://github.com/jloons/buntic/blob/main/docs/seo.md)
|
|
359
|
+
- ⌨️ [Referencia del CLI](https://github.com/jloons/buntic/blob/main/docs/cli.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# 📋 Ejemplos de Referencia para
|
|
1
|
+
# 📋 Ejemplos de Referencia para Buntic
|
|
2
2
|
|
|
3
|
-
Este directorio contiene plantillas y snippets canónicos listos para copiar y usar en proyectos
|
|
3
|
+
Este directorio contiene plantillas y snippets canónicos listos para copiar y usar en proyectos Buntic.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -43,7 +43,7 @@ Este directorio contiene plantillas y snippets canónicos listos para copiar y u
|
|
|
43
43
|
<layout src="../layouts/main.html">
|
|
44
44
|
<seo
|
|
45
45
|
title="Inicio | Mi Empresa"
|
|
46
|
-
description="Bienvenido al sitio web oficial generado con
|
|
46
|
+
description="Bienvenido al sitio web oficial generado con Buntic."
|
|
47
47
|
image="/images/hero.png"
|
|
48
48
|
/>
|
|
49
49
|
|
|
@@ -147,7 +147,7 @@ export default async function({ paginate }) {
|
|
|
147
147
|
## 6. Storage Loader OCI Registry / ORAS (`storage/oci.ts`)
|
|
148
148
|
|
|
149
149
|
```ts
|
|
150
|
-
import { createOrasStorage } from "
|
|
150
|
+
import { createOrasStorage } from "buntic";
|
|
151
151
|
|
|
152
152
|
export default createOrasStorage({
|
|
153
153
|
hostname: process.env.OCI_REGISTRY_HOST || "localhost:5000",
|