Skip to content

Add dropLabels to BundleTaskParameters to strip out labelled statements #65

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

Merged
merged 6 commits into from
Apr 14, 2025

Conversation

SBLMikeDemone
Copy link
Contributor

@SBLMikeDemone SBLMikeDemone commented Apr 10, 2025

This PR adds a dropLabels field to the BundleTaskParameters interface so packages can strip out certain labelled statements.

Example

If you set dropLabels to ['dev'] and your TS looks like this:

function main(): void {
    dev: if (world.isEditorWorld) {
      // Do development specific things
    }
}

The that if statement will be removed from the resulting JS.

Copy link
Collaborator

@rlandav rlandav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Let me know when you want me to merge it.

@SBLMikeDemone SBLMikeDemone changed the title Give packages the choice to strip out 'dev' labels Add dropLabels to BundleTaskParameters to strip out labelled statements Apr 14, 2025
Copy link
Contributor

@frgarc frgarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@rlandav rlandav merged commit 7531dce into main Apr 14, 2025
2 checks passed
@rlandav rlandav deleted the mike.demone/drop-dev-label branch April 14, 2025 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants