File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424This is a monorepo containing the following packages:
2525
2626- [ kitsu] —Framework agnostic client using Axios
27- - [ kitsu-core] —Core (de)serialisation functions
27+ - [ kitsu-core] —Framework agnostic (de)serialisation functions
2828
2929## Features
3030
@@ -36,10 +36,10 @@ This is a monorepo containing the following packages:
3636
3737| Package | Package<br > Size\* | Node | Chrome | Firefox | Safari | Edge |
3838| -----------: | :----------------: | :--: | :----: | :-----: | :----: | :--: |
39- | ` kitsu ` | ≤ 8.9 kb | 10+ | 67 + | 68+ | 12+ | 18+ |
40- | ` kitsu-core ` | ≤ 1.5 kb | 10+ | 67 + | 68+ | 12+ | 18+ |
39+ | ` kitsu ` | ≤ 8.2 kb | 10+ | 69 + | 68+ | 12+ | 18+ |
40+ | ` kitsu-core ` | ≤ 1.6 kb | 10+ | 69 + | 68+ | 12+ | 18+ |
4141
42- \* Including all dependencies, minified & gzipped
42+ \* Including all dependencies and minified with brotli
4343
4444## Contributing
4545
Original file line number Diff line number Diff line change 4848 "jest" : " ~26.0.0" ,
4949 "lerna" : " ~3.22.0" ,
5050 "rollup" : " ~2.11.0" ,
51+ "rollup-plugin-delete" : " ~1.2.0" ,
5152 "rollup-plugin-local-resolve" : " ~1.0.7" ,
5253 "rollup-plugin-terser" : " ~6.1.0" ,
5354 "size-limit" : " ~4.5.0" ,
Original file line number Diff line number Diff line change 2424 <a href=https://paypal.me/wopian> <img alt="support me on paypal.me"src=https://flat.badgen.net/badge/support%20me%20on/paypal.me/pink> </a >
2525</p >
2626
27- <p align =center >Core <a href =http://jsonapi.org >JSON:API</a > serialisation and deserialisation components </p >
27+ <p align =center >A simple, lightweight & framework agnostic <a href =http://jsonapi.org >JSON:API</a > serialisation and deserialisation functions </p >
2828
2929<p align =center ><a href =https://github.com/wopian/kitsu/blob/master/packages/kitsu-core/MIGRATING.md >Migration guide</a > for v9 and previous major releases</p >
3030
31- #
31+ #
3232
3333## Features
3434
3535- JSON-API 1.0 compliant
3636- Automatically links relationships to data
3737- Works in Node and on the web
38+ - Zero dependencies
3839
3940## Node / Browser Support
4041
4142| Package | Package<br > Size\* | Node | Chrome | Firefox | Safari | Edge |
4243| -----------: | :----------------: | :--: | :----: | :-----: | :----: | :--: |
43- | ` kitsu-core ` | ≤ 1.5 kb | 10+ | 67 + | 68+ | 12+ | 18+ |
44+ | ` kitsu-core ` | ≤ 1.6 kb | 10+ | 69 + | 68+ | 12+ | 18+ |
4445
45- \* Including all dependencies, minified & gzipped< br >
46+ \* Minified with brotli
4647
4748## Install
4849
@@ -256,7 +257,7 @@ Filters includes for the specific relationship requested
256257#### Parameters
257258
258259- ` included ` ** [ Array] ( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array ) < ; [ Object] ( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object ) >** The response included object
259- - ` relationship ` ** [ Object] ( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object ) **
260+ - ` relationship ` ** [ Object] ( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object ) **
260261 - ` relationship.id ` ** [ string] ( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String ) ** The relationship ID
261262 - ` relationship.type ` ** [ string] ( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String ) ** The relationship type
262263
Original file line number Diff line number Diff line change 11{
22 "version" : " 9.1.8" ,
33 "name" : " kitsu-core" ,
4- "description" : " Core serialisation and deserialsation functions for the kitsu JSON:API client " ,
4+ "description" : " Simple, lightweight & framework agnostic JSON:API (de)serialsation functions " ,
55 "author" : " James Harris <wopian@wopian.me>" ,
66 "contributors" : [
77 " Brandon Martinez <me@brandonmartinez.com>" ,
1111 " Menthol <bennetteson@gmail.com>"
1212 ],
1313 "license" : " MIT" ,
14- "main" : " lib/index.js " ,
15- "module" : " lib/index.mjs " ,
14+ "main" : " lib/index" ,
15+ "module" : " lib/index" ,
1616 "unpkg" : " lib/index.browser.js" ,
1717 "jsdelivr" : " lib/index.browser.js" ,
1818 "types" : " types/index.d.ts" ,
4242 "size-limit" : [
4343 {
4444 "path" : " ./lib/index.js" ,
45- "limit" : " 2 kb"
45+ "limit" : " 2 kb" ,
46+ "brotli" : true
4647 },
4748 {
4849 "path" : " ./lib/index.mjs" ,
49- "limit" : " 2 kb"
50+ "limit" : " 2 kb" ,
51+ "brotli" : true
5052 },
5153 {
5254 "path" : " ./lib/index.browser.js" ,
53- "limit" : " 2 kb"
55+ "limit" : " 2 kb" ,
56+ "brotli" : true
5457 }
5558 ],
5659 "gitHead" : " 5c9778d191d17d7c9790cfc6d0f4e983b4742a53" ,
Original file line number Diff line number Diff line change 11import babel from '@rollup/plugin-babel'
22import { terser } from 'rollup-plugin-terser'
33import local from 'rollup-plugin-local-resolve'
4+ import del from 'rollup-plugin-delete'
45import pkg from './package.json'
56
67const {
@@ -30,7 +31,9 @@ const pluginsMain = [
3031export default [
3132 {
3233 input : 'src/index.js' ,
33- plugins : pluginsMain ,
34+ plugins : [
35+ del ( { targets : './lib/*' } ) ,
36+ ...pluginsMain ] ,
3437 output : {
3538 file : `${ pkg . unpkg } ` ,
3639 name : 'kitsuCore' ,
Original file line number Diff line number Diff line change 2424 <a href=https://paypal.me/wopian> <img alt="support me on paypal.me"src=https://flat.badgen.net/badge/support%20me%20on/paypal.me/pink> </a >
2525</p >
2626
27- <p align =center >A simple, lightweight & framework agnostic <a href =http://jsonapi.org >JSON:API</a > client for < a href = https://kitsu.io >Kitsu.io</ a > and other APIs </p >
27+ <p align =center >A simple, lightweight & framework agnostic <a href =http://jsonapi.org >JSON:API</a > client using Axios </p >
2828
2929<p align =center ><a href =https://github.com/wopian/kitsu/blob/master/packages/kitsu/MIGRATING.md >Migration guide</a > for v9 and previous major releases</p >
3030
31- #
31+ #
3232
3333## Features
3434
4141
4242| Package | Package<br > Size\* | Node | Chrome | Firefox | Safari | Edge |
4343| ------: | :----------------: | :--: | :----: | :-----: | :----: | :--: |
44- | ` kitsu ` | ≤ 8.9 kb | 10+ | 67 + | 68+ | 12+ | 18+ |
44+ | ` kitsu ` | ≤ 8.2 kb | 10+ | 69 + | 68+ | 12+ | 18+ |
4545
46- \* Including all dependencies, minified & gzipped
46+ \* Including all dependencies and minified with brotli
4747
4848## Response Comparison
4949
Original file line number Diff line number Diff line change 11{
22 "version" : " 9.1.8" ,
33 "name" : " kitsu" ,
4- "description" : " Simple & lightweight JSON- API client for Kitsu and other compliant APIs " ,
4+ "description" : " Simple,lightweight & framework agnostic JSON: API client using Axios " ,
55 "author" : " James Harris <wopian@wopian.me>" ,
66 "contributors" : [
77 " Brandon Martinez <me@brandonmartinez.com>" ,
1111 " Menthol <bennetteson@gmail.com>"
1212 ],
1313 "license" : " MIT" ,
14- "main" : " lib/index.js " ,
15- "module" : " lib/index.mjs " ,
14+ "main" : " lib/index" ,
15+ "module" : " lib/index" ,
1616 "types" : " types/index.d.ts" ,
1717 "homepage" : " https://github.com/wopian/kitsu/tree/master/packages/kitsu#readme" ,
1818 "repository" : " https://github.com/wopian/kitsu/tree/master/packages/kitsu" ,
5353 "size-limit" : [
5454 {
5555 "path" : " ./lib/index.js" ,
56- "limit" : " 10 kb"
56+ "limit" : " 10 kb" ,
57+ "brotli" : true
5758 },
5859 {
5960 "path" : " ./lib/index.mjs" ,
60- "limit" : " 10 kb"
61+ "limit" : " 10 kb" ,
62+ "brotli" : true
6163 }
6264 ],
6365 "gitHead" : " 5c9778d191d17d7c9790cfc6d0f4e983b4742a53" ,
Original file line number Diff line number Diff line change 11import babel from '@rollup/plugin-babel'
22import { terser } from 'rollup-plugin-terser'
33import local from 'rollup-plugin-local-resolve'
4+ import del from 'rollup-plugin-delete'
45import pkg from './package.json'
56
67const {
@@ -22,6 +23,7 @@ const globals = {
2223}
2324
2425const plugins = [
26+ del ( { targets : './lib/*' } ) ,
2527 local ( ) ,
2628 terser ( )
2729]
@@ -37,13 +39,13 @@ export default {
3739 plugins : pluginsMain ,
3840 output : [
3941 {
40- file : pkg . main ,
42+ file : ` ${ pkg . main } .js` ,
4143 format : 'cjs' ,
4244 sourcemap : false ,
4345 globals
4446 } ,
4547 {
46- file : pkg . module ,
48+ file : ` ${ pkg . module } .mjs` ,
4749 format : 'es' ,
4850 sourcemap : false ,
4951 globals
You can’t perform that action at this time.
0 commit comments