Skip to content

Commit

Permalink
Update dev deps + release please
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldps committed Mar 19, 2024
1 parent 912666c commit a224038
Show file tree
Hide file tree
Showing 10 changed files with 3,507 additions and 4,290 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on: push

jobs:
build:
uses: dimensionalpocket/development-js/.github/workflows/default-node-build.yml@0.7.0
uses: dimensionalpocket/development-js/.github/workflows/default-node-build.yml@1.3.0
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Release

on:
push:
branches: main

jobs:
default:
uses: dimensionalpocket/development-js/.github/workflows/default-release.yml@1.3.0
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,21 @@ strip("{yellow}Yellow{/} Text")
// => "Yellow Text"
```

## Emoji

This library provides an additional `wrapEmoji()` method that wraps all emoji in `<span class="wmE">` tags.

```js
import { wrapEmoji } from '@webmuds/colors'

wrapEmoji("looking good 👍")
// => 'looking good <span class="wmE">👍</span>'
```

You can then use CSS to change the `wmE` class to use a different font (for instance, a [monochrome emoji font](https://fonts.google.com/noto/specimen/Noto+Emoji?noto.query=emoji)).

_(wmE = webmuds emoji)_

## CSS File

This library provides the above CSS classes in `css/colors.css` so that you can import it in other projects. Classes are prefixed with `wm` to avoid collision.
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ts-check

import { html } from './src/html.js'
import { html, wrapEmoji } from './src/html.js'
import { strip } from './src/strip.js'

export { html, strip }
export { html, strip, wrapEmoji }

0 comments on commit a224038

Please sign in to comment.