Licence
MIT
Version
0.1.105
Deps
3
Size
16 kB
Vulns
0
Weekly
0
ecopages
DRAFT / EXPERIMENTAL This package is currently in a draft state and is subject to significant changes.
ecopages is a CLI tool for the Ecopages framework. It provides:
- Project scaffolding: Quickly initialize new Ecopages projects from templates using
bunx ecopages init - Command utilities: Namespaced commands that wrap common Bun operations, automatically detecting and applying your
eco.config.ts
Quick Start
Initialize a new project:
bunx ecopages init my-app
cd my-app
bun install
bun devCLI Utilities
Commands
| Command | Description | Bun Equivalent |
|---|---|---|
ecopages init <dir> |
Initialize a new Ecopages project | scaffolding tool |
ecopages dev [entry] |
Start the development server | bun run [entry] --dev |
ecopages dev:watch [entry] |
Start with watch mode (restarts on file changes) | bun --watch run [entry] --dev |
ecopages dev:hot [entry] |
Start with hot reload (HMR without restart) | bun --hot run [entry] --dev |
ecopages build [entry] |
Build for production | bun run [entry] --build |
ecopages start [entry] |
Start production server | bun run [entry] |
ecopages preview [entry] |
Preview production build | bun run [entry] --preview |
Note:
[entry]defaults toapp.tsif not provided.
Environment Overrides
All server commands (dev, dev:watch, dev:hot, start, preview) support the following options:
| Option | Environment Variable | Description |
|---|---|---|
-p, --port <port> |
ECOPAGES_PORT |
Server port (default 3000) |
-n, --hostname <host> |
ECOPAGES_HOSTNAME |
Server hostname |
-b, --base-url <url> |
ECOPAGES_BASE_URL |
Base URL for the app |
-d, --debug |
ECOPAGES_LOGGER_DEBUG |
Enable debug logging |
-r, --react-fast-refresh |
- | Enable React Fast Refresh HMR |
Example:
# Start dev server on port 8080 with debug logging
ecopages dev --port 8080 --debug
# Start dev server with React Fast Refresh
ecopages dev -r
# Start production server with custom hostname
ecopages start --hostname 0.0.0.0 --port 3001Ecopages Packages
The Ecopages ecosystem consists of individual framework packages published to JSR. Import them directly in your project:
import { eco } from '@ecopages/core';
import { kitajsPlugin } from '@ecopages/kitajs';Available Packages
| Package | Description | JSR Link |
|---|---|---|
@ecopages/browser-router |
Client-side navigation and view transitions for Ecopages. | JSR |
@ecopages/bun-inline-css-plugin |
Bun plugin to process CSS files using CSS Processors. | JSR |
@ecopages/bun-mdx-kitajs-loader |
Bun loader to load MDX files with KitaJS. | JSR |
@ecopages/bun-postcss-loader |
Bun loader to load PostCSS files. | JSR |
@ecopages/core |
Foundational layer of the Ecopages ecosystem. | JSR |
@ecopages/file-system |
Runtime-agnostic file system utilities (Bun/Node.js). | JSR |
@ecopages/image-processor |
Image processing library for optimized responsive images. | JSR |
@ecopages/kitajs |
KitaJS plugin for Ecopages integration. | JSR |
@ecopages/lit |
Lit plugin for Ecopages integration. | JSR |
@ecopages/mdx |
MDX plugin for Ecopages integration. | JSR |
@ecopages/postcss-processor |
Utility functions for processing CSS with PostCSS. | JSR |
@ecopages/react |
React plugin for Ecopages integration. | JSR |
@ecopages/react-router |
Client-side SPA router for Ecopages React apps. | JSR |
Explore all packages at jsr.io/@ecopages.
Installation
bun add ecopagesTo use Ecopages packages in your project, create a .npmrc file in the root of your project to configure JSR registry resolution:
@jsr:registry=https://npm.jsr.io
Then add the packages you need:
bun jsr add @ecopages/core @ecopages/kitajsLicense
MIT