title: How to use jquery-ui with npm (laravel-mix)?
body: <p>I have <code>npm install</code>ed the jquery-ui. It's all split into components there and it seems pretty hard to use them in my javascript files that I compile using laravel-mix.</p>
  
  <p>This is how I managed to invoke draggable to a set of elements:</p>
  
  <pre><code>require('jquery-ui/themes/base/draggable.css');
  var jQuery = require('jquery');
  var draggable = require('jquery-ui/ui/widgets/draggable');
  
  var draggableOptions = {
      revert: 'invalid',
      // other options...
      cursor: 'move'
  };
  
  $('.resource').each(function(index, resource) {
      new draggable(draggableOptions, $(resource));
  });
  
  // The documented approach didn't work because there was no function 'draggable'
  // $('.resource').draggable(draggableOptions);
  </code></pre>
  
  <p>Now I am trying to use the jquery-ui effects like <code>bounce</code> or <code>shake</code> and I can't manage to import and/or invoke them in any way either like documented or like above. And all in all I have the feeling that I'm doing it all wrong and it should be easier.</p>