Skip to content

Commit

Permalink
fix: update the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
melniiv committed Nov 15, 2024
1 parent 9515133 commit a7e41b2
Showing 1 changed file with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ The general requirements for new Component development:
### Available scripts


| Name | Purpose | Useful Options |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| `yarn dev` | Starts storybook environment that can be used for developing components. | |
| `yarn typecheck` | Runs the ts type check in the project components. | |
| `yarn lint` | Lints the application to be according to quality standards (eslint) and formatting standards (prettier). | `--fix`: fix fixable problems |
| `yarn test` | Runs tests with jest. | `--watch`: enable watch mode |
| `yarn test-storybook` | Runs storybook accessibility tests jest. | |
| `yarn build` | Builds application with rollup. | |
| `yarn docker:dev` | Runs the application with docker with Development target environment. | |
| `yarn docker:prod` | Runs the application with docker with Production target environment. | |
| `yarn docker:down` | Shuts down the docker environment. | |
| `yarn publish-canary` | Publishes a canary tagged version of the application. CD is configured to run this script on additions to the main branch. | |
| `yarn publish-stable` | Publishes a stable tagged version of the application. CD is configured to run this script on additions to the main branch. | |
| `yarn generate:graphql` | Generates / updates GraphQL schema for the project. | |
| Name | Purpose | Useful Options |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| `yarn dev` | Starts storybook environment that can be used for developing components. | |
| `yarn typecheck` | Runs the ts type check in the project components. | |
| `yarn lint` | Lints the application to be according to quality standards (eslint) and formatting standards (prettier). | `--fix`: fix fixable problems |
| `yarn test` | Runs tests with jest. | `--watch`: enable watch mode |
| `yarn test-storybook` | Runs storybook accessibility tests jest. | |
| `yarn build` | Builds application with rollup. | |
| `yarn docker:dev` | Runs the application with docker with Development target environment. | |
| `yarn docker:prod` | Runs the application with docker with Production target environment. | |
| `yarn docker:down` | Shuts down the docker environment. | |
| `yarn publish-canary` | Publishes a canary tagged version of the application. CD is configured to run this script on additions to the main branch. | |
| `yarn publish-stable` | Publishes a stable tagged version of the application. CD is configured to run this script on additions to the main branch. | |
| `yarn generate:graphql` | Generates / updates GraphQL schema for the project. | |

**NOTE: To manually publish a new version to the NPM, you will need the credentials that can be found from the City of Helsinki Culture and Leisure's Vault-service.**

Expand Down Expand Up @@ -207,8 +207,29 @@ function App() {
</ConfigProvider>
);
}


```

## Publishing new versions

There are 2 scripts for publishing of new verions of npm pagage:


To publish a stable version use

```bash
yarn publish-stable
```

To publish a canary version use

```bash
yarn publish-canary
```

**Note:** There is an a known issue with publishing using Windows environment. If you have a Windows machine use Docker container to publish the package.An Apollo client linked to a graphql endpoint with a supported schema (headless CMS) must be provided in the `apolloClient` field of the `config` object.

## Known issues

- Jest has difficulties loading this library. When this library is required in a test file, it's possible that some imports are cjs and some are esm. These two variants do not share a react context which can result in `useConfig` calls that return an empty config object even though `<ConfigProvider>` is declared correctly. I.e. `<ConfigProvider>` sets values for `context1` and `useConfig` reads `context2`.
Expand Down

0 comments on commit a7e41b2

Please sign in to comment.