jerrylow / basictable

Basic Table jQuery or Vanilla JS plugin for simple responsive tables.
MIT License
127 stars 57 forks source link

feature_request(dependencies): vanilla JavaScript or Cash instead of JQuery #14

Closed Kristinita closed 3 years ago

Kristinita commented 3 years ago

1. Summary

It would be nice, if would be possible to use Basic Table without JQuery.

  1. Possible it would be nice to have Basic Table written in a pure JS.
  2. Or make the plugin Cash-compatible.

2. Argumentation

2.1. Common cause

JQuery size, web performance.

2.2. Details

JQuery is a large library that can decrease a web performance. For example, see the article “You might not need jQuery: A 2018 Performance case study”. I don’t use JQuery on my site, and I don’t think having as much dependency as JQuery solely for responsive tables is the best solution.

3. About Cash

3.1. Shortly

From Cash GitHub Readme:

Cash is an absurdly small jQuery alternative for modern browsers (IE11+) that provides jQuery-style syntax for manipulating the DOM.

3.2. Details

I copied it from cash GitHub Readme:

Size Cash Zepto 1.2.0 jQuery Slim 3.4.1
Unminified 36.5 KB 58.7 KB 227 KB
Minified 16 KB 26 KB 71 KB
Minified & Gzipped 6 KB 9.8 KB 24.4 KB

A 76.6% gain in size reduction compared to jQuery. If you need a smaller bundle, we support partial builds too.

Features Cash Zepto 1.2.0 jQuery Slim 3.4.1
Supports Older Browsers
Supports Modern Browsers
Actively Maintained
Namespaced Events
Typed Codebase ✔ (TypeScript)
TypeScript Types ✔ (generated from code) ⚠️ (via DefinitelyTyped) ⚠️ (via DefinitelyTyped)
Partial Builds ✔ (can exclude individual methods) ⚠️ (can exclude whole modules) ⚠️ (can exclude whole modules)

4. Additional links

  1. Cash documentation
  2. Migration from jQuery to Cash guide

Thanks.

jerrylow commented 3 years ago

Thanks, a vanilla JS version is in the works.

jerrylow commented 3 years ago

Thanks for the issue - reminded me to finish it up. I've pushed a 2.0.0 version adding the vanilla JS version https://github.com/jerrylow/basictable/releases/tag/v2.0.0.

Kristinita commented 2 years ago

Status: DONE :heavy_check_mark:

Vanilla JS version of Basic Table works for me.

Thanks!