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

fix(docs): added quick installation instructions to Readme #64

Merged
merged 2 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all 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: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ This repository includes a shared CSS library (preprocessed with Sass) and HTML
By design, the CSS has no dependency on a specific Javascript framework and since the styles and html is separated then interested contributors can easily add component libraries in other frameworks such as React or Vue.js.
Also, the Angular UI library has no dependency to any design system/framework such as Bootstrap or Google's Material in order to reduce dependence on 3rd party vendors.

## Quick Start & Documentation
## Quick Start & documentation

The pattern library uses [Storybook](https://storybook.js.org)
Both CSS framework and Angular component library use [Storybook](https://storybook.js.org).

Documentation and Installation instructions can be found in the e-Gov CVI's Storybook:
Documentation and installation instructions can be viewed in the e-Gov CVI's Storybook:

[https://e-gov.github.io/cvi/](https://e-gov.github.io/cvi/)
[https://e-gov.github.io/cvi/](https://e-gov.github.io/cvi/).

Styles were based on the initial Veera Design System:

Expand All @@ -21,15 +21,20 @@ But please take note that e-Gov CVI **is not Veera**.

### Installation

Run `npm install` in the root folder.
1. Add the public Koodivaramu registry to your project by following the instructions [here](https://koodivaramu.eesti.ee/e-gov/cvi/-/packages/385).
2. Install the necessary package to your project:
1. CSS framework: `npm i --save @egov/cvi-styles`
2. Angular components: `npm i --save @egov/cvi-ng`
3. Icons: `npm i --save @egov/cvi-icons`
3. Import the dependencies to your project by following dedicated instructions in the docs for the [CSS framework](https://e-gov.github.io/cvi/?path=/docs/styles-how-to-install--how-to-install), [Angular components](https://e-gov.github.io/cvi/?path=/docs/angular-installation--installation), and [icons](https://e-gov.github.io/cvi/?path=/docs/icons-how-to-use--page).

## Using the Components
## Packages and artifacts repository

The built packages are published to the public Koodivaramu repository, from where you can download and add them to your application:

https://koodivaramu.eesti.ee/e-gov/cvi/-/packages

In addition, the storybook docker image is also published to the Koodivaramu repository:
In addition, the Storybook Docker image is also published to the Koodivaramu repository:

https://koodivaramu.eesti.ee/e-gov/cvi/container_registry

Expand Down Expand Up @@ -58,12 +63,14 @@ For example, if you need to introduce a content selector that inserts custom con

Run `npm run storybook` to build documentation and run the Storybook locally.

### Running storybook locally in docker
### Running Storybook locally in Docker

```
docker build -f ./libs/storybook/Dockerfile -t cvi-storybook .
docker-compose up storybook
docker-compose down
url: http://localhost:3005/
```

## Understand your workspace

Expand Down
4 changes: 2 additions & 2 deletions libs/storybook/src/lib/stories/angular.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ import uiPkg from '/libs/ui/package.json'

1. Install the library
```
npm i --save @egov/cvi-ng;
npm i --save @egov/cvi-ng
```

2. Import UiModule in your app.module.ts.
2. Import `UiModule` in your `app.module.ts`.

```ts
import { UiModule } from '@egov/cvi-ng';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The library styles are built using Sass (namely [Dart Sass](https://sass-lang.co
```
2. Include styles to a Sass file in the project:
```
@use '@egov/cvi-styles';
@use '@egov/cvi-styles/main';
```

You can also `@use` or `@import` a specific Sass module from the library, eg. `@use '@egov/cvi-styles/settings/variables/typography';`.