-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Storefront documentation (#2771)
- Loading branch information
Showing
16 changed files
with
2 additions
and
2,239 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,3 @@ | ||
This is documentation for Shopsys Platform StoreFront. Let's start with first two steps. | ||
# Shopsys Platform StoreFront | ||
|
||
## Install | ||
|
||
1 - Install all dependencies. | ||
|
||
```plain | ||
pnpm install | ||
``` | ||
|
||
## Start app | ||
|
||
2 - Start the development server. | ||
|
||
```plain | ||
pnpm run dev | ||
``` | ||
|
||
After this command open http://localhost:3000/ in your browser. | ||
|
||
### Optional | ||
|
||
Build the app for production. | ||
|
||
```plain | ||
pnpm run build | ||
``` | ||
|
||
Run the built app in production mode. | ||
|
||
```plain | ||
pnpm start | ||
``` | ||
|
||
Run eslint for code | ||
|
||
```plain | ||
pnpm run lint | ||
``` | ||
|
||
Run eslint and fix code | ||
|
||
```plain | ||
pnpm run lint--fix | ||
``` | ||
|
||
Run prettier format code | ||
|
||
```plain | ||
pnpm run format | ||
``` | ||
|
||
Run translation files generator. You can find generated files in /public/locales/ folder. | ||
|
||
```plain | ||
pnpm run translate | ||
``` | ||
|
||
## Development | ||
|
||
### Generated GraphQL requests | ||
|
||
Requests to API are generated by [GraphQl Code Generator](https://www.graphql-code-generator.com/). The definitions of queries/mutations/fragments are stored in `./graphql/requests`. | ||
|
||
After some changes to API you need to regenerate hooks and types, so it's in sync with current state of Frontend API: This is automatically checked on the CI pipeline. If the hooks and types are not regenerated, the pipeline fails. | ||
|
||
1. Run `php phing frontend-api-generate-graphql-schema` inside php-fpm container | ||
2. Run `pnpm run gql:codegen` in storefront container | ||
Storefront documentation is available in the documentation of Shopsys Platform in the section [Storefront](https://docs.shopsys.com/storefront). |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.