diff --git a/package.json b/package.json index 5f4539e..aac7b4e 100644 --- a/package.json +++ b/package.json @@ -22,32 +22,32 @@ }, "homepage": "https://github.com/plantain-00/tree-component#readme", "devDependencies": { - "@angular/common": "2.4.6", - "@angular/compiler": "2.4.6", - "@angular/core": "2.4.6", - "@angular/forms": "2.4.6", - "@angular/platform-browser": "2.4.6", - "@angular/platform-browser-dynamic": "2.4.6", + "@angular/common": "2.4.8", + "@angular/compiler": "2.4.8", + "@angular/core": "2.4.8", + "@angular/forms": "2.4.8", + "@angular/platform-browser": "2.4.8", + "@angular/platform-browser-dynamic": "2.4.8", "@types/node": "7.0.5", - "@types/react": "15.0.6", - "@types/react-dom": "0.14.22", - "clean-css-cli": "4.0.7", + "@types/react": "15.0.13", + "@types/react-dom": "0.14.23", + "clean-css-cli": "4.0.8", "core-js": "2.4.1", - "html-minifier": "3.3.3", + "html-minifier": "3.4.0", "image2base64-cli": "1.0.3", "raw-loader": "0.5.1", "react": "15.4.2", "react-dom": "15.4.2", - "rev-static": "1.3.1", - "rxjs": "5.1.0", - "stylelint": "7.8.0", + "rev-static": "2.1.1", + "rxjs": "5.2.0", + "stylelint": "7.9.0", "stylelint-config-standard": "16.0.0", - "tslint": "4.4.2", - "typescript": "2.1.5", - "vue": "2.1.10", - "vue-class-component": "4.4.0", + "tslint": "4.5.1", + "typescript": "2.2.1", + "vue": "2.2.1", + "vue-class-component": "5.0.0", "webpack": "2.2.1", - "zone.js": "0.7.6" + "zone.js": "0.7.7" }, "dependencies": { "tslib": "1" diff --git a/rev-static.config.js b/rev-static.config.js new file mode 100644 index 0000000..ac5aa7e --- /dev/null +++ b/rev-static.config.js @@ -0,0 +1,17 @@ +module.exports = { + inputFiles: [ + "demo/vue.bundle.js", + "demo/vue/index.ejs.html", + "demo/react.bundle.js", + "demo/react/index.ejs.html", + "demo/angular.bundle.js", + "demo/angular/index.ejs.html" + ], + outputFiles: file => file.replace(".ejs", ""), + json: false, + ejsOptions: { + rmWhitespace: true + }, + sha: 256, + customNewFileName: (filePath, fileString, md5String, baseName, extensionName) => baseName + "-" + md5String + extensionName, +} \ No newline at end of file diff --git a/rev-static.config.json b/rev-static.config.json deleted file mode 100644 index aeb7c70..0000000 --- a/rev-static.config.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "inputFiles": [ - "demo/vue.bundle.js", - "demo/vue/index.ejs.html", - "demo/react.bundle.js", - "demo/react/index.ejs.html", - "demo/angular.bundle.js", - "demo/angular/index.ejs.html" - ], - "outputFiles": [ - "demo/vue/index.html", - "demo/react/index.html", - "demo/angular/index.html" - ], - "json": false, - "ejsOptions": { - "rmWhitespace": true - }, - "sha": 256 -} \ No newline at end of file diff --git a/src/common.ts b/src/common.ts index e337ffd..8772fde 100644 --- a/src/common.ts +++ b/src/common.ts @@ -206,7 +206,7 @@ export function ondragleave(target: HTMLElement, data: TreeData[]) { } export function ondrop(target: HTMLElement, dragTarget: HTMLElement | null, data: TreeData[], next: (dropData: DropData) => void) { - const sourcePath = dragTarget!.dataset["path"].split(",").map(s => +s); + const sourcePath = dragTarget!.dataset["path"]!.split(",").map(s => +s); const targetPathString = target.dataset["path"]; if (targetPathString) { const targetPath = targetPathString.split(",").map(s => +s); diff --git a/src/tsconfig.json b/src/tsconfig.json index 6555fdc..17ef7b0 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -13,6 +13,7 @@ "jsx": "react", "outDir": "../dist", "declaration": true, - "experimentalDecorators": true + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true } } \ No newline at end of file