You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Navigate to `merchant_center_application_kit/playground`, duplicate `.env.local.template`, name the duplicate `.env.local` and add these values:
37
-
38
-
```bash
39
-
MC_API_URL="https://mc-api.europe-west1.gcp.commercetools.com"# for prod
40
-
APP_ID=""# can be an empty string for dev
41
-
CTP_INITIAL_PROJECT_KEY=<your-project-name># the name of any project you have access to on prod/stage
42
-
```
30
+
Navigate to `merchant_center_application_kit/playground`, duplicate `.env.local.template`, name the duplicate `.env.local` and add the necessary values.
43
31
44
-
3. Build and run the application kit
32
+
2. Build and run the application kit
45
33
46
-
> In a new terminal window, navigate to the project root directory - `/merchant_center_application_kit` - and run:
34
+
First build the application. In a new terminal window, navigate to the project root directory and run:
> Confirm that the watch is running successfully, you should see:
40
+
Once the build is complete, you can run the application in watch mode by running:
53
41
54
42
```bash
55
-
>"info @commercetools-frontend/application-shell waiting for changes..."
56
-
>...
43
+
$ yarn build:watch
57
44
```
58
45
59
-
4. Remove fake permission:
60
-
> `PERMISSIONS.ViewPlaygroundStateMachines` which is required by playground is a fake permission and you might need to remove it
61
-
> in order to be able to run and view the application. You'll need to remove it twice in `custom-application-config.mjs` and once in
62
-
> `routes.js` so that `permissions`/`demandedPermissions` are just empty objects:
46
+
3. Update Playground Permissions:
63
47
64
-
`custom-application-config.mjs`
48
+
`PERMISSIONS.ViewPlaygroundStateMachines` is not necessary and you might need to remove it in order to be able to view the application.
49
+
You'll need to remove it twice in `custom-application-config.mjs` and once in `routes.js` so that `permissions`/`demandedPermissions` are empty arrays:
5. Build and run the [playground application](./playground):
76
+
```bash
77
+
const canViewStateMachines = useIsAuthorized({
78
+
demandedPermissions: [],
79
+
});
80
+
```
96
81
97
-
> In a new terminal window, navigate to the project root directory - `/merchant_center_application_kit`, and run:
82
+
4. Build and run the [playground application](./playground):
98
83
99
-
```bash
100
-
$ yarn playground:build && yarn playground:start
101
-
```
84
+
In a new terminal window, navigate to the project root directory and run:
102
85
103
-
> This should open a browser window and the standard merchant cernter login prompt, login using your account, and then the playground should load in the browser if permissions are set correctly (I am unclear on what those perms are or how to set them, so this is completely theoretical on my part at this point)
86
+
```bash
87
+
$ yarn playground:start
88
+
```
104
89
105
-
### RUNNING THE APP KIT AND PLAYGROUND AFTER INITIAL INSTALLATION
90
+
### Running the App Kit and Playground After Initial Installation
106
91
107
92
> The playground application consumes the app-kit dependencies as es modules, which means you need to bundle the packages first. We recommend to bundle the packages in watch mode in one terminal process and start the playground app in another terminal process.
0 commit comments