Skip to content

code-corps/ember-cli-shopify-draggable-shim

 
 

Repository files navigation

ember-cli-shopify-draggable-shim

CircleCI

An ember-cli shim for working with Shopify's drag-and-drop library draggable

Using this addon in your Ember application

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' }
      ));
    }
});

Installation

  • git clone https://github.com/timrourke/ember-cli-shopify-draggable-shim.git this repository
  • cd ember-cli-shopify-draggable-shim
  • yarn install

Running

Running Tests

  • yarn test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.

About

ember-cli shim for Shopify draggable

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 84.5%
  • HTML 15.5%