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

CLI: Migrate CLI to TypeScript #10802

Merged
merged 41 commits into from
May 18, 2020
Merged

CLI: Migrate CLI to TypeScript #10802

merged 41 commits into from
May 18, 2020

Conversation

gaetanmaisse
Copy link
Member

@gaetanmaisse gaetanmaisse commented May 15, 2020

Somehow related to #5030

What I did

Migrate @storybook/cli to TypeScript.

I tried to introduce as little change as possible because we are already in the beta phase. The goal of this PR is just to migrate the code to TS to simplify future refactoring and work on E2E and CLI (see #10723 for details). Some refactoring will come later.

Sidenote: there are a lot of commits because I worked with small steps, if needed I can squash them in a single one.

How to test

  • All CLI tests must be 🟢

⚠️ All files in `template*` directories are ignored because they must be as it in the `dist`.
@gaetanmaisse gaetanmaisse added maintenance User-facing maintenance tasks cli labels May 15, 2020
@gaetanmaisse gaetanmaisse force-pushed the tech/migrate-cli-to-TS branch from 892bb25 to 237aa9a Compare May 15, 2020 19:41
 - Add needed @types packages
 - remove `silent: true` option in `sync` calls as it looks like it's not a valid option
 - remove `encoding: 'utf-8'` option in `spawn` calls as it looks like it's not a valid option
@gaetanmaisse gaetanmaisse force-pushed the tech/migrate-cli-to-TS branch from 237aa9a to d4b2203 Compare May 15, 2020 19:49
@gaetanmaisse gaetanmaisse marked this pull request as ready for review May 15, 2020 20:37
@gaetanmaisse gaetanmaisse requested review from yannbf and tooppaaa May 15, 2020 20:38
lib/cli/src/extract.ts Outdated Show resolved Hide resolved
lib/cli/src/generators/SVELTE/index.ts Outdated Show resolved Hide resolved
@yannbf
Copy link
Member

yannbf commented May 16, 2020

This is golden 💕

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Great job @gaetanmaisse 💯

@gaetanmaisse
Copy link
Member Author

Thanks for the help @yannbf. I just added 2 commits related to the feedbacks given by @tooppaaa and resolved conflicts with next so as soon as CI is 🟢, it is mergeable 🎉

@gaetanmaisse gaetanmaisse merged commit ee7c9ec into next May 18, 2020
@gaetanmaisse gaetanmaisse deleted the tech/migrate-cli-to-TS branch May 18, 2020 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants