Open apaleslimghost opened 9 years ago
:+1:
+1
+1
+1
When do you plan to publish into npm ?
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
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.
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
this solved the issue
window.jQuery = $;
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
.