An ember-cli shim for working with Shopify's drag-and-drop library draggable
From the root of your Ember application, run this command from the command line:
ember install ember-cli-shopify-draggable-shim
To use Shopify's Draggable library in your application, import it and use the classes as usual:
import Component from '@ember/component';
import ShopifyDraggable from '@shopify/draggable';
const { Draggable } = ShopifyDraggable;
export default Component.extend({
didRender() {
this._super(...arguments);
this.set('draggable', new Draggable(
this.$('ul').toArray(),
{ draggable: 'li' }
));
}
});
git clone https://github.com/timrourke/ember-cli-shopify-draggable-shim.git
this repositorycd ember-cli-shopify-draggable-shim
yarn install
ember serve
- Visit your app at http://localhost:4200.
yarn test
(Runsember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit https://ember-cli.com/.