Skip to content

Mark Embling

jQuery Plugins Published on NPM

In the past I've put together a couple of jQuery plugins which have just been knocking around on GitHub. Since they might still be useful - particularly on older/legacy projects - I've belatedly made them both available to install via NPM.

Installation from NPM

I put together these small jQuery plugins as the need arose, but other than publishing them on GitHub for manual installation, had not made them available via any other method. With NPM being used for front-end as well as server-side code, and being effectively the defacto source for JavaScript packages, I thought it would be best to publish them there.

As of today, these plugins (jquery-gpopover-plugin and jquery-charactercounter-plugin) can be installed via NPM:

npm install jquery-gpopover-plugin
npm install jquery-charactercounter-plugin

Needless to say, both will require jQuery too, as they will not automatically bring it down as a dependency.

Alternatives

Any alternative JS package manager which uses the NPM registry ought to also pick these up, so most bases are probably covered. If there's anything missing, please raise an issue on the appropriate GitHub repository.

In addition, both plugins are available via Bower. Since Bower is no longer recommended for use, I'd suggest only using this for existing projects where Bower is already in use. I intend to make sure the Bower packages remain available and any additional plugins, libraries or other browser-targeting JS code will probably be available there too.

Last but not least, manual installation is always an option.

Related Links

I've used NPM plenty of times for consuming packages but had never actually put anything together to publish as a package before. The following posts from the NPM blog were useful in outlining how it all fits together, particularly in relation to jQuery plugins.