longbill / jquery-date-range-picker

A jQuery plugin that allows user to select a date range
MIT License
1.12k stars 579 forks source link

Npm package wrong main file #438

Closed aaronkzhou closed 5 years ago

aaronkzhou commented 6 years ago

https://www.npmjs.com/package/jquery-date-range-picker

the main file should change from require('./src/jquery.daterangepicker.js') to require('./dist/jquery.daterangepicker.js');;

holtkamp commented 5 years ago

So what should it be?

require('./src/jquery.daterangepicker.js')

or

require('./dist/jquery.daterangepicker.js')

? Any documentation available on where to look this up?

aaronkzhou commented 5 years ago

it should require('./dist/jquery.daterangepicker.js');, it doesn't work for requiring require('./src/jquery.daterangepicker.js'), don't know why, just change the package.json main pls

holtkamp commented 5 years ago

Well, I do not have access to https://www.npmjs.com/package/jquery-date-range-picker, it seems https://www.npmjs.com/~youpinyao created it. @youpinyao?. The version there (1.0.4) also does not match "our" versions: https://github.com/longbill/jquery-date-range-picker/tags

So I am afraid I can not help...

holtkamp commented 5 years ago

This is probably resolved in https://github.com/longbill/jquery-date-range-picker/releases/tag/v0.19.0

Note we went for the 'src' approach. You should build it yourself, also see https://github.com/longbill/jquery-date-range-picker/pull/441#issuecomment-413654963