Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM module #177

Open
christophior opened this issue Nov 4, 2015 · 17 comments
Open

NPM module #177

christophior opened this issue Nov 4, 2015 · 17 comments
Labels
Status: todo Accepted issue that needs someone to fix it. Type: meta Issue related to plugin infrastructure, publishing, or other repository-related matters.

Comments

@christophior
Copy link

I was wondering if there was an NPM module for this project. Thanks

@leonidkuznetsov18
Copy link

+1

@christophior
Copy link
Author

NPM

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!

@apertureless
Copy link

You should add momentjs and jquery as package dependencies, so they get automatically installed

@holtkamp
Copy link
Collaborator

if someone can provide a PR for this?

@christophior
Copy link
Author

@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' },

@ankurk91
Copy link
Contributor

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

@holtkamp
Copy link
Collaborator

I think @longbill should register this, as author of the library

@ankurk91
Copy link
Contributor

ankurk91 commented May 27, 2016 via email

@ankurk91
Copy link
Contributor

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

Ref

@tomasklingen
Copy link

tomasklingen commented Jul 5, 2017

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?

@vedmant
Copy link

vedmant commented Dec 15, 2017

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.

@monovertex
Copy link
Collaborator

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.

@monovertex monovertex added Type: meta Issue related to plugin infrastructure, publishing, or other repository-related matters. Status: todo Accepted issue that needs someone to fix it. labels Sep 19, 2018
@Hirurg103
Copy link
Contributor

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 dd79b09 @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?

@monovertex
Copy link
Collaborator

@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.

@monovertex
Copy link
Collaborator

@Hirurg103, please check out if it works now. I updated the requirement to allow anything above v4.9.1 for the time being.

@Hirurg103
Copy link
Contributor

@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?

@monovertex
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: todo Accepted issue that needs someone to fix it. Type: meta Issue related to plugin infrastructure, publishing, or other repository-related matters.
Projects
None yet
Development

No branches or pull requests

9 participants