Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ improve(@roots/bud): options api #2078

Merged
merged 2 commits into from
Feb 3, 2023
Merged

✨ improve(@roots/bud): options api #2078

merged 2 commits into from
Feb 3, 2023

Conversation

kellymears
Copy link
Member

@kellymears kellymears commented Feb 2, 2023

A small change but a good one. Backwards compatible but it will let us remove a lot of extension methods in bud@7.0.

export default async bud => {
    bud.wpjson
      .set(`settings.color.customDuotone`, false)
      .set(`settings.color.customGradient`, false)
      .set(`settings.color.defaultDuotone`, false)
      .set(`settings.color.defaultGradients`, false)
      .set(`settings.color.defaultPalette`, false)
      .set(`settings.color.duotone`, [])
      .enable()

    bud.tailwind.set(`generateImports`, true)

    bud.typescript
      .set(`appendTsSuffixTo`, [/\.vue$/])
      .set(`babel`, false)
      .typecheck.enable()

    bud.terser
      .set(`extractComments`, false)
      .set(`terserOptions.mangle.safari10`, false)

    bud.vue.set(`runtimeOnly`, false)

    bud.imagemin.sharp
      .set(`encodeOptions.png.quality`, 60)
      .set(`encodeOptions.webp.quality`, 60)
}

Can also retrieve options with get:

bud.vue.get(`runtimeOnly`)

refers:

  • none

Type of change

PATCH: backwards compatible change

This PR includes breaking changes to the following core packages:

  • none

This PR includes breaking changes to the follow extensions:

  • none

Dependencies

Adds

  • none

Removes

  • none

@kellymears kellymears added the 🚀! automerge label Feb 3, 2023
@kellymears kellymears self-assigned this Feb 3, 2023
@kodiakhq kodiakhq bot merged commit e789c5c into main Feb 3, 2023
@kodiakhq kodiakhq bot deleted the improve-options-api branch February 3, 2023 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant