tristen / tablesort

:arrow_up_down: A small tablesorter in plain JavaScript
https://tristen.ca/tablesort/demo/
MIT License
1.1k stars 179 forks source link

ES6 import don't work with additional sorts #169

Open siamkreative opened 6 years ago

siamkreative commented 6 years ago

While this works:

import Tablesort from 'tablesort'

I don't know how to import the additional sorts (example: number, date). Could you please document this?

dpmango commented 5 years ago

+1 to this issue.

I think src/sorts/ should be marked as exportable modules

xsonic commented 5 years ago

+1

siamkreative commented 5 years ago

I believe this library is no longer maintained :(

tristen commented 5 years ago

👋 Pull requests happily accepted!

contradictioned commented 5 years ago

Importing the sort files directly does not work, as inside of them Tablesort is not defined. This here is working (at least for webpack): https://github.com/contradictioned/tablesort/commit/c00ff8271828d06e3dbca4af27f7d993a25c438a

Problem is, that this import probably does not work with a plain-old-javascript setup.