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

Add a way to customise the comment style if banner is a string #428

Closed
mjeanroy opened this issue Aug 7, 2019 · 3 comments
Closed

Add a way to customise the comment style if banner is a string #428

mjeanroy opened this issue Aug 7, 2019 · 3 comments

Comments

@mjeanroy
Copy link
Owner

mjeanroy commented Aug 7, 2019

Currently, there is now way to customize the comment style if banner is a string? For example, this does not work:

license({
	banner: licenseStr,
	commentStyle: "ignored"
})

Originally posted by @revelt in #308 (comment)

@mjeanroy
Copy link
Owner Author

mjeanroy commented Aug 7, 2019

To address this issue, this commit add the possibility to define banner content like this:

license({
  banner: {
    commentStyle: 'ignored',
    content: licenseStr,
  },
});

Since I think having different options to define the "same thing", banner.file and banner.encoding are deprecated and should now be defined like:

license({
  banner: {
    commentStyle: 'ignored',
    content: {
      file: path.join(__dirname, 'LICENSE'),
      encoding: 'utf-8',
    },
  },
});

Old options are still supported, but will be removed in a future version and a warning will be printed to the console.

@mjeanroy
Copy link
Owner Author

mjeanroy commented Aug 7, 2019

@revelt Is that ok for you?
This is available with version 0.11.0, let me know if it solves your issue ;)

@mjeanroy
Copy link
Owner Author

@revelt I close the issue, please comment if it does not work for you ;)

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

No branches or pull requests

1 participant