diff --git a/build/tasks/test.js b/build/tasks/test.js index 64e6979..3d118ba 100644 --- a/build/tasks/test.js +++ b/build/tasks/test.js @@ -14,7 +14,7 @@ var argv = require('yargs') /** * Add the files to test, always beginning with the source files! */ -var filesToLoad = ['src/**/*.js', 'test/unit/initialize.spec.js', 'test/unit/lib/*.js']; +var filesToLoad = ['test/unit/initialize.js', 'src/**/*.js', 'test/unit/lib/*.js']; filesToLoad.push(path.join('test/unit/**', argv.t)); /** diff --git a/config.js b/config.js index bc590a5..755bc13 100644 --- a/config.js +++ b/config.js @@ -17,8 +17,10 @@ System.config({ }, map: { + "aurelia-binding": "npm:aurelia-binding@1.0.0-beta.1.2.2", "aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-beta.1.1.5", "aurelia-pal-browser": "npm:aurelia-pal-browser@1.0.0-beta.1.1.4", + "aurelia-polyfills": "npm:aurelia-polyfills@1.0.0-beta.1.0.6", "aurelia-templating": "npm:aurelia-templating@1.0.0-beta.1.1.4", "babel": "npm:babel-core@5.8.35", "babel-runtime": "npm:babel-runtime@5.8.35", @@ -58,6 +60,9 @@ System.config({ "npm:aurelia-pal-browser@1.0.0-beta.1.1.4": { "aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.1.1" }, + "npm:aurelia-polyfills@1.0.0-beta.1.0.6": { + "aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.1.1" + }, "npm:aurelia-task-queue@1.0.0-beta.1.1.1": { "aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.1.1" }, diff --git a/dist/system/index.js b/dist/system/index.js index eed032c..0fd04ea 100644 --- a/dist/system/index.js +++ b/dist/system/index.js @@ -12,6 +12,8 @@ System.register(['./options', './dragula'], function (_export) { if (callback !== undefined && typeof callback === 'function') { callback(defaults); } + + config.globalResources(['./dragula-and-drop']); } return { diff --git a/karma.conf.js b/karma.conf.js index bff225c..8a1a5a6 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -14,7 +14,7 @@ module.exports = function(config) { jspm: { // Edit this to your needs - loadFiles: ['src/**/*.js', 'test/unit/**/*.js'] + loadFiles: ['test/unit/initialize.js', 'src/**/*.js', 'test/unit/**/*.js'] }, diff --git a/package.json b/package.json index 0a1046a..69b5f58 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "url": "git+ssh://git@github.com/michaelmalonenz/aurelia-dragula.git" }, "devDependencies": { + "aurelia-polyfills": "^0.1.2", "aurelia-tools": "^0.1.18", "babel-eslint": "^4.1.8", "conventional-changelog": "0.0.11", @@ -52,11 +53,13 @@ "dist": "dist/amd" }, "dependencies": { - "aurelia-dependency-injection": "^1.0.0-beta.1.1.3", + "aurelia-binding": "^1.0.0-beta.1.2.2", + "aurelia-dependency-injection": "^1.0.0-beta.1.1.5", "aurelia-pal-browser": "^1.0.0-beta.1.1.3", "aurelia-templating": "^1.0.0-beta.1.1.4" }, "devDependencies": { + "aurelia-polyfills": "^1.0.0-beta.1.0.6", "babel": "babel-core@^5.8.24", "babel-runtime": "^5.8.24", "core-js": "^2.1.0" diff --git a/src/dragula-and-drop.js b/src/dragula-and-drop.js index 77550c7..8d98d92 100644 --- a/src/dragula-and-drop.js +++ b/src/dragula-and-drop.js @@ -1,4 +1,4 @@ -import {customElement, bindable} from 'aurelia-templating'; +import {customElement, bindable, noView} from 'aurelia-templating'; import {bindingMode} from 'aurelia-binding'; import {inject} from 'aurelia-dependency-injection'; @@ -12,13 +12,14 @@ import {Dragula} from './dragula'; @bindable({ name: 'isContainer', attribute: 'is-container', defaultBindingMode: bindingMode.oneTime }) @bindable({ name: 'copy', defaultBindingMode: bindingMode.oneTime }) @bindable({ name: 'copySortSource', defaultBindingMode: bindingMode.oneTime }) -@bindable({ name: 'revertOnSpill', defaultBindingMode: bindingMode.oneTime }) -@bindable({ name: 'removeOnSpill', defaultBindingMode: bindingMode.oneTime }) +@bindable({ name: 'revertOnSpill', attribute: 'revert-on-spill', defaultBindingMode: bindingMode.oneTime }) +@bindable({ name: 'removeOnSpill', attribute: 'remove-on-spill', defaultBindingMode: bindingMode.oneTime }) @bindable({ name: 'direction', defaultBindingMode: bindingMode.oneTime }) @bindable({ name: 'ignoreInputTextSelection', attribute: 'ingore-input-text-selection', defaultBindingMode: bindingMode.oneTime }) @bindable({ name: 'mirrorContainer', attribute: 'mirror-container', defaultBindingMode: bindingMode.oneTime }) @customElement('dragula-and-drop') @inject(GLOBAL_OPTIONS) +@noView() export class DragulaAndDrop { constructor(globalOptions) { diff --git a/src/index.js b/src/index.js index 2e0dd21..1c39d97 100644 --- a/src/index.js +++ b/src/index.js @@ -10,4 +10,6 @@ export function configure(config, callback) { if (callback !== undefined && typeof(callback) === 'function') { callback(defaults); } + + config.globalResources(['./dragula-and-drop']); } diff --git a/test/unit/initialize.spec.js b/test/unit/initialize.js similarity index 68% rename from test/unit/initialize.spec.js rename to test/unit/initialize.js index 412e243..643439a 100644 --- a/test/unit/initialize.spec.js +++ b/test/unit/initialize.js @@ -1,3 +1,4 @@ +import 'aurelia-polyfills'; import {initialize} from 'aurelia-pal-browser'; initialize(); \ No newline at end of file