maizzle / framework

Quickly build HTML emails with Tailwind CSS.
https://maizzle.com
MIT License
1.2k stars 48 forks source link

5.x: add types for `config.build.current` #1322

Open cossssmin opened 1 month ago

cossssmin commented 1 month ago

config.build.current holds some path information about the template currently being processed, for example:

{
  path: {
    root: 'build_production',
    dir: 'build_production',
    base: 'transactional.html',
    ext: '.html',
    name: 'transactional'
  }
}

It would be useful to have types for this, for example when using config.build.current inside an event, for autocomplete:

export default {
  async afterTransformers({config}) {
    const template = config.build.current. // editor would suggest `name` here
  },
}