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

[plugin-replace] Document the values option #814

Merged
merged 5 commits into from
Mar 10, 2021

Conversation

nicolo-ribaudo
Copy link
Contributor

Rollup Plugin Name: replace

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

I discovered this option because it was used in the preventAssignment example, but it wasn't documented.

I got the option type from the .d.ts file.

Type: `{ [key: String]: Replacement }`, where `Replacement` is either a string or a `function` that returns a string.
Default: `{}`

To avoid mixing replacement strings with the other options, you can specify replacements in the `values` option:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
To avoid mixing replacement strings with the other options, you can specify replacements in the `values` option:
To avoid mixing replacement strings with the other options, you can specify replacements in the `values` option. For example, the following signature:

Comment on lines 129 to 131

// ⬇ ⬇ ⬇ ⬇ ⬇ ⬇ ⬇ ⬇ ⬇

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// ⬇ ⬇ ⬇ ⬇ ⬇ ⬇ ⬇ ⬇ ⬇
Can be replaced with:

I'm not sure how to suggest code fence / backticks on here, but please separate the two signatures in their own code blocks

@shellscape
Copy link
Collaborator

Thanks for the PR, a few comments to address but looks solid.

Copy link
Collaborator

@shellscape shellscape left a comment

Choose a reason for hiding this comment

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

thanks!

@nicolo-ribaudo
Copy link
Contributor Author

Updated!

Sorry it took three commits, I was trying to do it through the GH ui 😅

@shellscape shellscape merged commit 8752c2f into rollup:master Mar 10, 2021
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.

2 participants