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

[kbn/plugin-generator] remove sao, modernize #75465

Merged
merged 8 commits into from
Aug 21, 2020

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Aug 19, 2020

I'm working on #63069 and keep running into the nasty edges of the old plugin generator. The generator is currently based https://saojs.org/ v0.22, and while they're working on a v2 of the library there isn't any typescript support, and I think it's a somewhat unnecessary dependency.

Instead, the plugin generator just uses vinyl-fs to operate on the files in the template directory, processing .ejs files with ejs, filtering out files based on what type of plugin is requested, and then passing all compatible files through prettier, before writing to the target location. This happens nice and quick, and without needing a bunch of dependencies that SAO was installing.

2020-08-20 08 13 53

Additional QOL changes:

  • ask for the name of the plugin if it's not provided on the CLI
  • new -y flag to use the defaults, like yarn init -y, requires passing the name via the CLI
  • removed "customPath" logic, instead we ask if the plugin is internal and ask which type of internal plugin when y is supplied.

@spalger spalger force-pushed the refactory/plugin-generator branch 2 times, most recently from 7140049 to 94370a6 Compare August 19, 2020 21:58
@spalger spalger force-pushed the refactory/plugin-generator branch from d7bb31c to d44c696 Compare August 20, 2020 15:17
@spalger spalger marked this pull request as ready for review August 20, 2020 15:55
@spalger spalger requested review from a team as code owners August 20, 2020 15:55
@spalger spalger added release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.10.0 v8.0.0 labels Aug 20, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

👍 for design. Just moves a single .scss file

Copy link
Contributor

@tylersmalley tylersmalley left a comment

Choose a reason for hiding this comment

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

LGTM - pretty amazing how much faster it is as well.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@spalger spalger merged commit 7b23e7c into elastic:master Aug 21, 2020
@spalger spalger deleted the refactory/plugin-generator branch August 21, 2020 01:50
spalger added a commit that referenced this pull request Aug 21, 2020
thomasneirynck pushed a commit to thomasneirynck/kibana that referenced this pull request Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants