@y_nk/astro-post-build
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

astro-post-build integration

What is it?

It is a wrapper around the astro:build:done hook to be able to run a function after all is built.

How to use it?

  1. install it with your package manager @y_nk/astro-post-build
  2. import it in your astro config import postBuild from '@y_nk/astro-post-build'
  3. put it into your integration stack: integrations: [postBuild(async () => {})]

Why does it exist?

If you want to execute things post build which depends on the astro config, you may find that an inline integration is enough. For example you could write:

{
  integrations: [
    {
      name: 'post build actions',
      hooks: {
        async 'astro:build:done'() {}
      }
    }
  ]
}

...but this will not execute really last if you have an adapter ; rather it will execute last before the adapter hooks. This is where this integration becomes handy.

Readme

Keywords

Package Sidebar

Install

npm i @y_nk/astro-post-build

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

2.33 kB

Total Files

4

Last publish

Collaborators

  • y_nk