Skip to content

Commit

Permalink
docs: Update README.md to focus content for github and npm
Browse files Browse the repository at this point in the history
  • Loading branch information
skjalgepalg committed Sep 5, 2022
1 parent 884adda commit 73f8222
Showing 1 changed file with 12 additions and 39 deletions.
51 changes: 12 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,13 @@
# @nrk/core-icons

> Icon and logo kit providing a consistent and predictable user experience across platforms and NRK services
## Documentation

https://static.nrk.no/core-icons/latest/

## Installation

[Download the Sketch library](sketch://add-library?url=https%3A%2F%2Fstatic.nrk.no%2Fcore-icons%2Flatest%2Fcore-icons.rss) for sketching, [individual SVGs](https://static.nrk.no/core-icons/latest/index.html#icons) for Android, [PDFs](https://static.nrk.no/core-icons/latest/index.html#icons) for iOS. All icons follow [BEM naming conventions](http://getbem.com/) and are prefixed with `nrk-` to play nice with existing code.

### Using NPM

```bash
npm install @nrk/core-icons
```

All icons are exposed individually as exported constants (enabling [tree shaking](https://medium.com/@netxm/what-is-tree-shaking-de7c6be5cadd)):

```js
import { nrkLogoNrk } from '@nrk/core-icons' // Vanilla JS, String
import { NrkLogoNrk } from '@nrk/core-icons/jsx' // React, ReactElement

<NrkLogoNrk /> // Example render a NRK logo with React
<span style={{ color: 'red', fontSize: 20 }}> // Style is inherited from parent element
<NrkLogoNrk />
</span>
```

### Using static

Recommended only for prototyping.

```html
<script async src="https://static.nrk.no/core-icons/major/11/core-icons.min.js"></script>
```

## Local development

First clone `@nrk/core-icons` and install its dependencies:

```bash
Expand All @@ -46,17 +18,18 @@ npm start # Your browser will open documentation with hot reloading
```

## Building and committing
After having applied changes, remember to build before pushing the changes upstream.

After having applied changes, remember to build before commiting and pushing your changes upstream.

See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
)

```bash
git checkout -b feature/my-changes
# update the source code
# Update the source code
npm run build
git commit -am "Add my changes"
git push origin feature/my-changes
# then make a PR to the master branch,
# and assign another developer to review your code
git commit -am "<type>[optional scope]: <desciption>"
git push --set-upstream origin feature/my-changes
# Make a PR to the master branch,
# Assign a developer to review your code
```

> NOTE! Please also make sure to keep commits small and clean (that the commit message actually refers to the updated files).
> Stylistically, make sure the commit message is **Capitalized** and **starts with a verb in the present tense** (for example `Add minification support`).

0 comments on commit 73f8222

Please sign in to comment.