Skip to content

Commit

Permalink
- created 2 separate build files for iife & es (the default module)
Browse files Browse the repository at this point in the history
- updated packages
  • Loading branch information
yairEO committed Feb 5, 2024
1 parent 73d9fb3 commit 6e4bead
Show file tree
Hide file tree
Showing 12 changed files with 764 additions and 537 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,27 @@ I advise using a `type='text'` input which can offer support for any color forma

## Use

The codebase is bundled into 2 formats:

`iife` (to be used as standalone script):

```html
<script src='@yaireo/color-picker/color-picker.iife.js'></script>
<script>
const { default:ColorPicker, any_to_hex, changeColorFormat } = window.colorPicker
</script>
```

`es` (to be used via `import` command in your bundle or moduled sciprt).<br>
This is the default ("main") the package serves:
```html
<script src='@yaireo/color-picker'></script>
<script>
const { default:ColorPicker, any_to_hex, changeColorFormat } = window.colorPicker
</script>
```


```js
const cPicker = new ColorPicker({
// accepted formats: HEX(A), RGB(A), HSL(A), X11 color name
Expand Down
3 changes: 3 additions & 0 deletions dist/color-picker.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/color-picker.es.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/color-picker.iife.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/color-picker.iife.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 6e4bead

Please sign in to comment.