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 new Init command for Project Setup #880

Merged
merged 19 commits into from
Jan 23, 2024
Merged

Add new Init command for Project Setup #880

merged 19 commits into from
Jan 23, 2024

Conversation

thafryer
Copy link
Member

@thafryer thafryer commented Dec 20, 2023

This PR adds an init command to help customers set up Chromatic for usage within their projects. The API looks as such:
npx chromatic init -f cypress|playwright. The init script does the following

  1. installs needed dependencies based on the user's provided framework.
  2. Add a Chromatic Config file with some initial options.
  3. Add a Npm script for Chromatic.

To QA:

npx [email protected] init

Project Type to QA

  • New Storybook Project
  • New Playwright Project, with Storybook Already Installed
  • New Playwright Project, without Storybook Already Installed
  • New Cypress Project, with Storybook Already Installed
  • New Cypress Project, without Storybook Already Installed
📦 Published PR as canary version: 10.5.0--canary.880.7630510194.0

✨ Test out this PR locally via:

npm install [email protected]
# or 
yarn add [email protected]

@thafryer thafryer added the minor Auto: Increment the minor version when merged label Dec 20, 2023
@thafryer thafryer requested a review from tmeasday January 12, 2024 03:44
@thafryer thafryer marked this pull request as ready for review January 12, 2024 03:44
@thafryer thafryer requested a review from tevanoff January 12, 2024 04:48
bin-src/init.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
bin-src/init.ts Outdated Show resolved Hide resolved
bin-src/init.ts Outdated Show resolved Hide resolved
bin-src/init.ts Outdated Show resolved Hide resolved
bin-src/init.ts Outdated Show resolved Hide resolved
bin-src/init.ts Show resolved Hide resolved
bin-src/init.ts Outdated Show resolved Hide resolved
@thafryer thafryer requested a review from skitterm January 18, 2024 19:24
@skitterm
Copy link
Member

@thafryer can you include the API change in the PR description (aka npx chromatic init --playwright|cypress) and any other ramifications this PR will have?

@thafryer
Copy link
Member Author

@thafryer can you include the API change in the PR description (aka npx chromatic init --playwright|cypress) and any other ramifications this PR will have?

@skitterm I updated the description!

bin-src/init.ts Outdated Show resolved Hide resolved
bin-src/init.ts Show resolved Hide resolved
bin-src/init.ts Show resolved Hide resolved
bin-src/init.ts Outdated Show resolved Hide resolved
@thafryer thafryer added the release Auto: Create a `latest` release when merged label Jan 19, 2024
@thafryer thafryer requested a review from tevanoff January 19, 2024 21:59
bin-src/init.ts Outdated Show resolved Hide resolved
@thafryer thafryer requested review from tevanoff and tmeasday January 23, 2024 00:22
Copy link
Contributor

@tevanoff tevanoff 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!

@thafryer thafryer added this pull request to the merge queue Jan 23, 2024
Merged via the queue into main with commit ef407e6 Jan 23, 2024
19 checks passed
@thafryer thafryer deleted the new-init-command branch January 23, 2024 18:54
@ghengeveld
Copy link
Member

🚀 PR was released in v10.4.0 🚀

@ghengeveld ghengeveld added the released Verdict: This issue/pull request has been released label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Auto: Increment the minor version when merged release Auto: Create a `latest` release when merged released Verdict: This issue/pull request has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants