Skip to content

abell v1.0.0-alpha.10: First v1 Prototype, Vite-based SSG

Pre-release
Pre-release
Compare
Choose a tag to compare

Abell v1.0.0 First Prototype

You can try out the following changes on abell@next

Working Prototype

Currently, it only supports TypeScript and won't work with JavaScript projects. Will add JS support in follow-up releases 🙈

Vite-based SSG

  • Abell's rendering logic is now a Vite Plugin. You can use it as-
// vite.config.ts
import { defineConfig } from 'vite'
import { vitePluginAbell } from 'abell';

export default defineConfig({
  plugins: [vitePluginAbell()]
})
  • The dev-server, and bundling will now be handled by vite
  • Having Vite enables you to now use import syntax inside Abell blocks
{{
  import rawText from './something.txt?raw'; // One of the vite features to load raw data from files
  import navbar from './navbar.abell'; // This works because of abell's vite plugin
}}
<html>
<body>
  {{ navbar }}

  hello {{ rawText }}
</body>
</html>
  • You can use any vite plugins and loaders with abell now. This will mean plugins like vite-plugin-markdown can be used now instead of having any abell-specific solutions.
  • Since most of the dev-server and bundling part is now handled by vite, a lot of code from abell is removed. I have moved code from abell-renderer to abell and abell-renderer will be deprecated with the v1.
  • The assignments, reassignments, and imports will have to happen in the first block now.

Changes in CLI

  • abell build is now abell generate (abell build will continue to work as an alias but generate will be documented)
  • abell serve is now abell dev (In a lot of projects, serve is used for script that serves the build. dev is used in dev-servers so made sense to move to abell dev. abell serve will continue to work as alias but won't be documented)

Note: inside this repository, the changes are on branch one

bieeeeeee 🌻