Skip to content

Commit

Permalink
Merge pull request #172 from dhershman1/to-module
Browse files Browse the repository at this point in the history
Kyanite 2.0.0 Module Upgrade
  • Loading branch information
dhershman1 authored Aug 16, 2023
2 parents f022b5d + 1e910db commit de2953c
Show file tree
Hide file tree
Showing 316 changed files with 6,969 additions and 4,663 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exp.js
test.html
dist/
TODO.md
docs/

# Created by https://www.toptal.com/developers/gitignore/api/macos,node
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,node
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## v2.0.0

### Breaking Changes

- Converted kyanite to a full blown javascript module
- This may cause support issues for IE 11
- Converted from UMD to CJS support
- This may cause support issues for IE 11
- The minified scripts now use `K` instead of `kyanite` as the TS files specificy
- Removed unminified version of the library in favor of breaking down supporting of multiple formats
- Removed "local copy" future support for direct html script tags

### Chore

- Export script completely re written
- Updated all dev dependencies

### Fixed

- Rollup build stuff to be easier to use on my end and offer more stable support when I run builds

## v1.6.3

### Changed
Expand Down
28 changes: 5 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ The goal for Kyanite is to be stripped down, light weight, and intuitive. The id

## How To

> **Note:** As of `v2.0.0` the module should be imported as just `K` instead of `kyanite`
> The unminified version of the library is no longer available as of 2.0.0
With a CDN

```html
<!-- It is recommended to replace the @latest with a strict version number for production -->
<script src="https://cdn.jsdelivr.net/npm/kyanite@latest/dist/kyanite.min.js"></script>
<!-- To use the debug friendly kyanite simply remove .min from the filename -->
<script src="https://cdn.jsdelivr.net/npm/kyanite@latest/dist/kyanite.js"></script>
<script>
const K = kyanite
<script src="https://cdn.jsdelivr.net/npm/kyanite@latest/dist/kyanite.iife.min.js"></script>

<script>
K.isEmpty({})
</script>
```
Expand All @@ -79,31 +79,13 @@ Standard module system
```js
// This will use the module path in the package.json (src/index.js)
import * as K from 'kyanite'
// However if you want to grab the dev version
import * as K from 'kyanite/dist/kyanite.js'
```

Common JS

```js
// For the prod minified version
const K = require('kyanite')
// For the dev/debug friendly version
const K = require('kyanite/dist/kyanite.js')
```

Local copy script tag

```html
<!-- To use the prod minified version -->
<script src="/path/to/dist/kyanite.min.js"></script>
<!-- To use the dev/debug friendly version -->
<script src="/path/to/dist/kyanite.js"></script>
<script>
const K = kyanite
K.isEmpty({})
</script>
```

## Testing
Expand Down
Loading

0 comments on commit de2953c

Please sign in to comment.