Skip to content

The Astro compiler. Written in Go. Distributed as WASM.

License

Notifications You must be signed in to change notification settings

withastro/compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c74be2c · Dec 9, 2021
Dec 9, 2021
Dec 2, 2021
Oct 20, 2021
Dec 9, 2021
Dec 9, 2021
Nov 29, 2021
Dec 9, 2021
Oct 20, 2021
Sep 9, 2021
Oct 20, 2021
Oct 20, 2021
Nov 29, 2021
Dec 1, 2021
Nov 29, 2021
Nov 29, 2021
Oct 14, 2021
Oct 6, 2021
Nov 29, 2021
Oct 23, 2021

Repository files navigation

Astro Compiler

Astro’s Go + WASM compiler.

⚠️ Currently in beta!

Install

npm install @astrojs/compiler

Usage

Note: API will change before 1.0! Use at your own discretion.

import { transform } from '@astrojs/compiler';

const result = await transform(source, {
  site: 'https://mysite.dev',
  sourcefile: '/Users/astro/Code/project/src/pages/index.astro',
  sourcemap: 'both',
  internalURL: 'astro/internal',
});

Contributing

CONTRIBUTING.md