- Clone this repo to your local machine
- Install package as global (
npm install -g
) - Move to a scratch directory, so it's easy to clean up. For reference we will call this
cli-test
- Execute
reaction help
and ensure that you get the help text
- Execute
reaction create-project api myserver
- Verify that the project was created
- Change to that directory
- Run
reaction develop api
. Ensure you get a message saying you need to runnpm install
- Run
npm install
- Run
reaction develop api
. Validate that Reaction starts in dev mode and you see log output - Hit Ctrl-C
- Verify that the mongo docker image is shut down by running
docker-compose ps
from the command line and seeing an empty entry.
- Navigate to the
myserver
directory that you just created - Run
reaction create-plugin api myplugin
- Validate that the plugin is created in the
custom-packages
directory - Run
reaction develop api
and ensure that the newly created plugin is loaded by checking the logs
- If you stopped it, start the api server again by running
reaction develop api
again from the directory you created - Open a new terminal window
- From the
cli-test
directory runreaction create-project storefront my-storefront
- Verify that the project was created
- Change to that directory
- Run
reaction develop storefront
. Ensure you get a message saying you need to runyarn install
- Run
yarn install
- Run
reaction develop storefront
. Validate that storefront starts in dev mode and you see log output and that storefront loads in the browser
- If the api server is not running start the api server again by running
reaction develop api
again from the directory you created - Open a new terminal window
- Execute
reaction create-project admin my-admin
from thecli-test
directory - Verify that the project was created
- Change to that directory
- Run
reaction develop admin
. Ensure you get a message saying you need to runnpm install
- Run
npm install
- Run
reaction develop admin
. Validate that admin starts in dev mode and you see log output and the admin panel loads. Note that the admin can take a while to start so be patient
** Note that the server from above must be shutdown and mongo must be stopped for this to work.
- Run
reaction create-project demo mydemo
- Change to the
mydemo
directory - Check that the storefront (localhost:4000), graphQL server (localhost:3000) and admin (localhost:4080) are all running (this might take a minute or so)
- Run
export SHOW_VERBOSE_TELEMETRY_DATA=1
- Run
reaction create-project api myserver-2
- Observe that all the tracking info is output and is correct
- Run
reaction telemetry off
- Run any command except help or version
- Observe that there is no telemetry output
- Ensure that telemetry is enabled
- Go to
<your-home-directory>/.config/configstore/reaction-cli.json
and look for youuser
entry - Run
reaction create-project api telemetrycheck
- Log into GA console and look at the real time panel to ensure that the info was recorded correctly include os version, etc.