-
Notifications
You must be signed in to change notification settings - Fork 28
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
chore(README.md): add more comprehensive instructions for developing application kit bundles in readme #2346
base: main
Are you sure you want to change the base?
chore(README.md): add more comprehensive instructions for developing application kit bundles in readme #2346
Conversation
…the application kit bundles in readme
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/commercetools/merchant-center-application-kit/7ssK8sTdSc62bctMNWUsJ3tpJ555 |
README.md
Outdated
|
||
2. Add necessary environment variables | ||
|
||
> In the vscode file tree or the terminal, navigate to `merchant_center_application_kit/playground`, open `.env.local.template`, and add these values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file shouldn't be modified––you'll want to duplicate it and rename to .env.local
instead. No need to specify the method you'll use to do it, either; I'm sure there's an Emacs user in the org somewhere 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, changed in most recent commit
README.md
Outdated
```bash | ||
MC_API_URL="https://mc-api.europe-west1.gcp.commercetools.com" # for prod | ||
APP_ID="" # can be an empty string for dev | ||
CTP_INITIAL_PRODUCT_KEY=<your-project-name> # the name of any project you have access to on prod/stage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be CTP_INITIAL_PROJECT_KEY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed it should be, thanks!
…ng the fake permission
…ng the fake permission
…ng the fake permission
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for trying to improve the docs. I find some of the suggestions confusing though and I think we only need to mention a couple of things. That should be enough.
Can you take another look? Thanks
README.md
Outdated
|
||
3. Build and run the application kit | ||
|
||
> In a new terminal window, navigate to the project root directory - `/merchant_center_application_kit` - and run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> In a new terminal window, navigate to the project root directory - `/merchant_center_application_kit` - and run: | |
> In a new terminal window, navigate to the project root directory and run: |
README.md
Outdated
> In a new terminal window, navigate to the project root directory - `/merchant_center_application_kit` - and run: | ||
|
||
```bash | ||
$ yarn && yarn prebuild && yarn build && yarn build:watch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command does not make much sense. Simply run build
.
$ yarn && yarn prebuild && yarn build && yarn build:watch | |
$ yarn build |
FYI: prebuild
is automatically executed when the build
command is executed. Every npm script that starts with pre<name of command>
does that.
README.md
Outdated
### Initial Installation | ||
|
||
1. Clone this repo | ||
|
||
```bash | ||
$ git clone https://github.com/commercetools/merchant-center-application-kit.git | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would omit this part to be honest, it does not seem relevant.
README.md
Outdated
4. Remove fake permission: | ||
> `PERMISSIONS.ViewPlaygroundStateMachines` which is required by playground is a fake permission and you might need to remove it | ||
> 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 | ||
> `routes.js` so that `permissions`/`demandedPermissions` are just empty objects: | ||
|
||
`custom-application-config.mjs` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand this point. Why fake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@emmenko
"Fake" might not be the best terminology but without removing them in those two files you cannot access the playground (see screenshot). Fedor helped me discover this and he called them fake permissions which is why I used that term but I can change it if there's a better alternative. We were curious though why they were there in the first place and if they needed to be removed permanently?
README.md
Outdated
permissions: [PERMISSIONS.ViewPlaygroundStateMachines], | ||
submenuLinks: [ | ||
{ | ||
uriPath: 'echo-server', | ||
permissions: [PERMISSIONS.ViewPlaygroundStateMachines], | ||
defaultLabel: '${intl:en:Menu.EchoServer}', | ||
labelAllLocales: [ | ||
{ | ||
locale: 'en', | ||
value: '${intl:en:Menu.EchoServer}', | ||
}, | ||
{ | ||
locale: 'de', | ||
value: '${intl:de:Menu.EchoServer}', | ||
}, | ||
], | ||
}, | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The custom app config does not need to change. You can omit this.
@@ -23,40 +23,119 @@ $ npx @commercetools-frontend/create-mc-app my-new-custom-application-project -- | |||
|
|||
## Developing application-kit packages | |||
|
|||
Install the dependencies (uses yarn workspaces): | |||
### Initial Installation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all section can be removed to be honest. We can mention to check and ensure to have the .env.local
file but I wouldn't document its content. Instead you can add more information and give hints in the template file itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@emmenko
When you initially pull down the repo this is the result when you run yarn build:watch after adding the environment variables without running yarn build first.
…of github.com:commercetools/merchant-center-application-kit into update-readme-developing-application-kit-bundles-docs
…g playground application from a fresh pull of the repository
9c0fac1
to
7fef0fa
Compare
@jmcreasman @ByronDWall I see that there is still some confusion about this. Let's maybe have a 1:1 chat and I'll explain a bit more how things are supposed to work. |
@emmenko I think a 1:1 chat would be helpful, thanks for taking the time to look things over and review |
Summary
Updates readme with more detailed instructions for setting up the development environment for application kit bundles.
Description
Adds more detailed direction regarding initially installing this repo and setting it up to watch the app-kit bundles and the playground