jquery-date-range-picker
jquery-date-range-picker copied to clipboard
NPM module
I was wondering if there was an NPM module for this project. Thanks
+1
https://github.com/christophior/jquery-daterangepicker-NPM
Using it with webpack and all that's really necessary is adding it to your module loaders along with moment and jquery as a loader and you're all set!
You should add momentjs and jquery as package dependencies, so they get automatically installed
if someone can provide a PR for this?
@apertureless i'm guessing that the added dependencies are to my repo which is used for the npm module. If no one makes the PR later on today then i'll add the changes in myself.
Also I have a fork of this plugin that has some changes that I might try to merge with the current version and PR back into this repo just to try and keep things in sync and not diverge.
Most of the changes are just exposing different parts of the API and adding some stuff to handle the hovering states so we could add some more customization when hovering.
Quick question to anyone using the NPM module, how exactly are you using it? Just trying to get some insight. The project that I'm using it on makes use of webpack where we just have a loader that's loading it up as follows
{ test: /jquery-\-daterangepicker/, loader:'imports?jquery,moment' },
Since we have package.json in repo now.
It should not be hard to publish on npm; just few commands from terminal
Quick start: https://docs.npmjs.com/getting-started/publishing-npm-packages
Full length tut: https://medium.com/@jdaudier/how-to-create-and-publish-your-first-node-js-module-444e7585b738#.h75u1htch
I think @longbill should register this, as author of the library
Yes, only he can.
For those who wants to install this library with npm can use this command:
npm install git://github.com/longbill/jquery-date-range-picker.git#0.5.1
where 0.5.1 is the git tag
Bumping, because npm install with git repos doesn't work great if added as a dependency.
It would be awesome if @longbill would publish it to npm! Especially that nowadays using module bundlers is the default.
edit: @holtkamp, I'm seeing somebody has published it on npm! https://www.npmjs.com/package/jquery-date-range-picker @youpinyao has released a couple of 1.x.x versions, but the "official" releases in this repo are not at 1. How is it related to this repo and its contributors?
Any updates on how to use it as with Webpack? For me it's just not loading: $(...).dateRangePicker is not a function with no other error.
The plugin was published to NPM by a 3rd-party and was no longer maintained. We have regained ownership of the NPM package name and we will have a proper version published soon. Since this issue seems to be one of the earliest ones related to NPM publishing, I will keep posting updates here and close it when we have the proper NPM package set up.
I tried to install the latest version of the plugin with yarn add longbill/jquery-date-range-picker
and the command failed with
error [email protected]: The engine "node" is incompatible with this module. Expected version "~4.9.1". Got "11.13.0"
error Found incompatible module.
In dd79b09e @monovertex bumped node version to ~4.9.1
(~4.9.1
in semantic versioning means that 4.9.x
versions are allowed, where x >= 1, see https://semver.npmjs.com/). @monovertex do you have any ideas what are the restrictions on the version of NodeJS in this project? And how these restrictions can be calculated based on the plugin dependencies?
@Hirurg103 I think the previous specified version was not even with the correct syntax, because it specified an absolute version, and might have been ignored. When I tried to install the dependencies on my machine with node 14, it failed, so this is why I bumped it.
However, this does not really matter when consuming the module as a dependency. I'll see if I can specify the node version only for development and leave it free for production, this way you'll be able to use it without running into that issue. I'll be back shortly with an update.
@Hirurg103, please check out if it works now. I updated the requirement to allow anything above v4.9.1
for the time being.
@monovertex I was able to successfully install version v0.21.1
of the plugin with yarn add longbill/jquery-date-range-picker
. Thank you a lot for the update!
Do you plan to publish the new version to NPM? I noticed that the version history of the NPM package is different from the release history in Github. Won't it cause problems with publishing new versions of the package that match Github release versions?
I plan to publish it to NPM relatively soon. It will cause issues, so I'll have to bump the version to 2.X.X. Along with this update I plan to clean up the dependencies and the build setup a bit.