Dedicated SSR (Server-side-rendered) Astro native Headless CMS, build from the ground up for the Astro community and by Astro community memb github.com/withstudiocms/studiocms
README.md

@withstudiocms/buildkit #

codecov

This is an esbuild based CLI kit for building Astro Integrations

Usage #

Installation #

Install the package in the root of the repo:

  1. Install the required dependencies
pnpm add @withstudiocms/buildkit
npm install @withstudiocms/buildkit
yarn add @withstudiocms/buildkit

Usage #

Once you install the buildkit package you now have access to a buildkit CLI utility, add the following to your integration scripts:

{
  "scripts": {
    "build": "buildkit build 'src/**/*.{ts,astro,css}'",
    "dev": "buildkit dev 'src/**/*.{ts,astro,css}'"
  }
}

The command pattern is buildkit <command> 'path/to/file or glob/**/**.{ts}' [flags]

Available Flags (All are optional) #

  • --no-clean-dist: Do not clean the dist output during build.
  • --bundle: Enable bundling.
  • --force-cjs: Force CJS output.
  • --tsconfig=tsconfig.json: Allows setting custom tsconfig for build time.
  • --outdir=dist: Allows settings the output directory.

Files considered Assets #

The following file extensions will be copied from their src to their respective outputs and not transformed as if they are static assets.

  • .astro
  • .d.ts
  • .json
  • .gif
  • .jpeg
  • .jpg
  • .png
  • .tiff
  • .webp
  • .avif
  • .svg
  • .stub

For other content types and how to use them see The esBuild Docs

Licensing #

MIT Licensed.