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

docs: Re-add wml instructions for linking @faststore/api #1171

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,29 @@ Example:
}
```

#### Linking local changes from `@faststore/api`

`graphql-js` package is cumbersome when using `yarn link` because it requires only one instance of the package and there are two.
filipewl marked this conversation as resolved.
Show resolved Hide resolved

For this reason, to see our changes at FastStore running on a local store, we need to use [wml](https://github.com/wix/wml).

So, suppose you want to make changes into the API package and test it at your local base.store, wml is used to copy all files from `packages/api` to `<path-to-base.store>/node_modules/@faststore/api`. It also watches for changes to copy/paste on the go.

To do this:

```bash
## At FastStore `/api` package folder (faststore/packages/api)
$ yarn develop

## These can be executed anywhere
$ npm install -g wml
filipewl marked this conversation as resolved.
Show resolved Hide resolved
$ wml add <faststore>/packages/api <path-to>.store/node_modules/@faststore/api
$ wml start

## Finally, at the base.store folder (base.store)
$ yarn clean && yarn develop
```

### Creating Components on the `faststore/ui`

You can generate the boilerplate files for your new component using the following command:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ These are the clients running in production with FastStore:
- [Carrefour](https://mercado.carrefour.com.br/)

## Contributing
This is still a work in progress, however, if you are also an adventurous person, you can read the code and have some fun!

This is still a work in progress, however, if you are also an adventurous person, you can read the code and have some fun! See [CONTRIBUTING.MD](https://github.com/vtex/faststore/blob/master/CONTRIBUTING.MD) for more information.

## Getting help

Expand Down