Mottie / tablesorter

Github fork of Christian Bach's tablesorter plugin + awesomeness ~
https://mottie.github.io/tablesorter/docs/
2.61k stars 754 forks source link

How do I include more widgets when installing tablesorter by npm install? #1214

Closed liangliang closed 8 years ago

liangliang commented 8 years ago

It seems like that a few widgets are included after npm install tablsoter.

But I want to include the scroller widget, how to do that?

Regards, Liang

Mottie commented 8 years ago

Hi @liangliang!

Using npm install tablesorter will add the entire contents of the dist folder, so all widgets are available. You will need to point to the desired widget(s) in a <script> tag in the HTML file.

liangliang commented 8 years ago

Hi @Mottie,

Thanks for the reply. Yeah, all js are in dist folder. But when I require('tablesorter'), it only includes jquery.tablesorter.combined.js which doesn't contain the scroller widget. Guess I will require('scoller-widget') manually.

Mottie commented 8 years ago

Sorry, I suck at npm & all that require factory node thingies.

If you have a nice solution that allows you to customize what widgets are loaded and/or required, I'd be happy for a PR :grinning:

tlorens commented 6 years ago

@liangliang Having the same problem. What's the proper method here? I'm ok with having to use multiple require() But I can't seem to figure out the naming to get it to load correctly.