ducksboard / gridster.js

gridster.js is a jQuery plugin that makes building intuitive draggable layouts from elements spanning multiple columns
http://gridster.net/
MIT License
6.04k stars 1.2k forks source link

Publish to npm #498

Open apaleslimghost opened 9 years ago

apaleslimghost commented 9 years ago

It's quite common to use npm for frontend libraries via a CommonJS bundler such as Browserify or Webpack.

Gridster already has a valid package.json; there's a couple more small changes that could be made to work better with the npm ecosystem.

After that, it's just a matter of npm publish.

lemonzi commented 9 years ago

:+1:

adamcbrewer commented 9 years ago

+1

thelinuxlich commented 9 years ago

+1

Vinze commented 8 years ago

+1

fkroockmann commented 8 years ago

When do you plan to publish into npm ?

anaibol commented 8 years ago

I think it's already published, but not as an CommonJS module. I am using:

npm i --save gridster

import gridster from 'gridster/dist/jquery.gridster.min

z1haze commented 8 years ago

this doesnt work.. at least not for me.. When i try to require it like this, I get $ undefined when it gets to the jquery part.. what could i be doing wrong? jquery is definitely required in my app above this.

jcubic commented 7 years ago

The same I'm using this:

import $ from 'jquery';
import gridster from 'gridster/dist/jquery.gridster.min';

and got error from webpack that jQuery is not defined

jcubic commented 7 years ago

this solved the issue

window.jQuery = $;