buntic 0.3.0 → 0.4.0
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 +39 -39
- package/dist/cli.js +1362 -189
- package/dist/config.d.ts +5 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +1389 -201
- 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/block-scanner.d.ts +28 -0
- package/dist/template/directives.d.ts +17 -8
- package/dist/template/engine.d.ts +2 -1
- package/dist/template/errors.d.ts +58 -0
- package/dist/template/expressions.d.ts +16 -0
- 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 +83 -43
- package/templates/skills/{bustatic → buntic}/examples/README.md +4 -4
package/dist/config.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function defineConfig(config:
|
|
1
|
+
import type { BunticConfig, ResolvedConfig } from "./types.js";
|
|
2
|
+
export declare function defineConfig(config: BunticConfig): BunticConfig;
|
|
3
3
|
/**
|
|
4
|
-
* Discovers the
|
|
4
|
+
* Discovers the Buntic project root:
|
|
5
5
|
* 1. If an explicit target directory is passed, verifies its existence.
|
|
6
6
|
* 2. If no target (or ".") is passed, walks up from startCwd until it finds
|
|
7
|
-
* either a "pages" (or "src/pages") directory or a "
|
|
7
|
+
* either a "pages" (or "src/pages") directory or a "buntic.config.*" file.
|
|
8
8
|
* 3. Throws a helpful, actionable error if no root is detected.
|
|
9
9
|
*/
|
|
10
10
|
export declare function findProjectRoot(cliTarget?: string, startCwd?: string): string;
|
|
11
|
-
export declare function resolveConfig(cliRootDir?: string, overrides?: Partial<
|
|
11
|
+
export declare function resolveConfig(cliRootDir?: string, overrides?: Partial<BunticConfig>): Promise<ResolvedConfig>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BunticConfig } from "./types.js";
|
|
2
2
|
import type { BuildOptions, BuildResult } from "./builder/builder.js";
|
|
3
3
|
import type { DevServerInstance } from "./server/dev.js";
|
|
4
|
-
export type {
|
|
4
|
+
export type { BunticConfig, ResolvedConfig, PageInfo, PageRouteInfo, StaticPathResult, PaginateOptions, PaginatePage, SiteConfig, SeoConfig, SeoImageConfig, FeedsConfig, PageSeo, FeedItem, PhotoAttributes, StorageAssetResult, StorageLoaderFn, } from "./types.js";
|
|
5
5
|
export { defineConfig, resolveConfig, findProjectRoot } from "./config.js";
|
|
6
6
|
export { TemplateEngine } from "./template/engine.js";
|
|
7
|
+
export { BunticTemplateError, type TemplateErrorLocation, type TemplateErrorOptions, } from "./template/errors.js";
|
|
7
8
|
export { loadPublicEnv, isReservedNamespace, parseEnvContent } from "./env.js";
|
|
8
9
|
export { resolveAllRoutes, createPaginator, buildCleanUrl, validateRouteParams, extractRouteTokens, isDynamicPattern, findCoLocatedLoader, } from "./router/routes.js";
|
|
9
10
|
export { AssetCache } from "./assets/cache.js";
|
|
@@ -18,13 +19,13 @@ export { generateRss2Xml, generateAtomXml, extractFeedEntries } from "./seo/feed
|
|
|
18
19
|
export { Builder, detectPublicCollisions, assertNoPublicCollisions, type BuildResult, type BuildOptions, type PublicCollision, } from "./builder/builder.js";
|
|
19
20
|
export { startDevServer, type DevServerInstance } from "./server/dev.js";
|
|
20
21
|
export { initProject, AVAILABLE_TEMPLATES, type TemplateName, type InitProjectOptions, type InitProjectResult, } from "./init.js";
|
|
21
|
-
export {
|
|
22
|
+
export { registerBunticModuleResolver, syncProjectTypes, } from "./runtime.js";
|
|
22
23
|
export { runCLI } from "./cli.js";
|
|
23
24
|
/**
|
|
24
25
|
* Programmatic helper to build a site.
|
|
25
26
|
*/
|
|
26
|
-
export declare function build(dir?: string, overrides?: Partial<
|
|
27
|
+
export declare function build(dir?: string, overrides?: Partial<BunticConfig>, options?: BuildOptions): Promise<BuildResult>;
|
|
27
28
|
/**
|
|
28
29
|
* Programmatic helper to start dev server.
|
|
29
30
|
*/
|
|
30
|
-
export declare function dev(dir?: string, overrides?: Partial<
|
|
31
|
+
export declare function dev(dir?: string, overrides?: Partial<BunticConfig>): Promise<DevServerInstance>;
|