Marrow Engine v1.1.0 is here to deliver a significantly more intuitive developer experience by introducing refinements to the CLI tool and streammlining the consle outputs for readability. This update aims to reduce the friction in the development workflow, ensuring the developer can more effectiviely navigate commands and interpret system feedback as they build their project. Of course beyond these core improvements, you the usually bug fixes and improvements to the make the overall engine peformance feel more responisive and reliable.
Commands
The all new Marrow Engine CLI now features a standard suite of commands for launching, building, and previewing your project, mirroring the common workflow found in most modern frameworks. To help you get started, a help command was included to list all available options and descriptions, which will is written to output the following:
Marrow Engine v1.1.0
USAGE
- marrow [command]
COMMANDS
- dev Start the development server
- preview Start the production server
- build Compile for production
- lint Lint source files
- fmt Format source files
fmt | fmt src/components/Card.tsx
- help Show this help message
Documentation: https://marrow-engine.docs.sudovanilla.org
By default, Marrow will run the help command if nothing is specificied.
Recommended to use the following as a task in your deno.json file:
{
"tasks": {
"marrow": "deno run -A @sudovanilla/marrow-engine"
}
}
Then to run deno task marrow [COMMAND], so to start the server would simply be deno task marrow dev.
Outputs
Introducing a more cohesive visual experience with revamped cosnole outputs that bring standardized coloring and formatting acorss all commands and actions. The build process has gotten now a more significant overhaul and now provides more data for every processed file, including specific route, file type, size, and duration of the transformation. Upon completion of the build, the console will display the summary highlighting the total build time and final footprint of your build dirctory.
For example, this is what the build output will look like when running marrow build:
Marrow Engine v1.1.0 - Building to ./dist...
--------------------------------------------------------------------------
Route Type Size Time
--------------------------------------------------------------------------
/ TSX 1.12kb 1.4ms
/about MD 3.54kb 4.51ms
/catalog TSX 9.52kb 143.6ms
/system TSX 2.52kb 3.2ms
/assets/images/logo.png PNG 98.4kb 188.5ms
--------------------------------------------------------------------------
Build Complete | Total Size: 115.2kb | Time: 344.2ms
Originally in v1.0.0, only the pages that were built was outputted, although other files like your static assets, in ./public were being processed as well. This update will now display all updates being processed. Not only that, Marrow Engine will ignore a list of files that are excluded during the build process; common files you won't want in your builds like .DS_Store and what not.
Configuration File
When setting up a Marrow Engine project, you are now required to have a marrow.config.ts file in the root directory, that'll handle the configuration for your website or app. Similiar to how Astro works, you'll import defineConfig as the configuration, you can also view all the new options that were added here:
import { defineConfig } from "@sudovanilla/marrow-engine"
import DefaultLayout from "@layouts/layout.tsx"
export default defineConfig({
dirs: {
build: "./dist",
pages: "./src/content",
public: "./public",
src: "./src",
},
markdown: {
theme: "github-dark"
},
layouts: {
"default": DefaultLayout,
},
redirects: {
"/old-page": "/new-page",
"/old": "/new"
},
server: {
port: 4321,
hostname: "192.168.1.113"
}
})
The configuration options are also now documented inside your IDE, when you hover over an option, it'll display brief detail about that option and indicate what the default is.
Other Improvements
When you run into an error like seeing the default 404 error page or face a 500 server internal error, you'll no longer be blasted with the default white theme. The error page has been rebuilt to include a dark mode now, if the device theme or client-browser theme is set to dark, using the light-dark CSS function.
Builds will now minify content such as style tags, Markdown content, and all TSX files in your build. This is to help shrink down the file sizes in final builds and require less downloading on the client-side.