phosphor-keymap
Advanced tools
Comparing version 0.5.2 to 0.6.0
@@ -1,2 +0,2 @@ | ||
import { Command } from 'phosphor-command'; | ||
import { ICommand } from 'phosphor-command'; | ||
import { IDisposable } from 'phosphor-disposable'; | ||
@@ -52,3 +52,3 @@ import { IKeyboardLayout } from './keyboard'; | ||
*/ | ||
command: Command; | ||
command: ICommand; | ||
/** | ||
@@ -55,0 +55,0 @@ * The arguments for the command, if necessary. |
@@ -267,3 +267,3 @@ /*----------------------------------------------------------------------------- | ||
event.stopPropagation(); | ||
command.execute(args); | ||
safeExecute(command, args); | ||
return; | ||
@@ -279,2 +279,13 @@ } | ||
/** | ||
* Safely execute a command and catch and log any exception. | ||
*/ | ||
function safeExecute(command, args) { | ||
try { | ||
command.execute(args); | ||
} | ||
catch (err) { | ||
console.error(err); | ||
} | ||
} | ||
/** | ||
* A cross-browser CSS selector matching prototype function. | ||
@@ -281,0 +292,0 @@ * |
{ | ||
"name": "phosphor-keymap", | ||
"version": "0.5.2", | ||
"version": "0.6.0", | ||
"description": "A module for keyboard shortcut mapping.", | ||
@@ -9,3 +9,3 @@ "main": "lib/index.js", | ||
"clear-cut": "^2.0.1", | ||
"phosphor-command": "^0.8.0", | ||
"phosphor-command": "^0.9.0", | ||
"phosphor-disposable": "^1.0.5" | ||
@@ -15,3 +15,2 @@ }, | ||
"coveralls": "^2.11.4", | ||
"css-loader": "^0.23.1", | ||
"expect.js": "^0.3.1", | ||
@@ -30,4 +29,2 @@ "fs-extra": "^0.26.3", | ||
"rimraf": "^2.4.2", | ||
"style-loader": "^0.13.0", | ||
"ts-loader": "^0.7.2", | ||
"typedoc": "^0.3.11", | ||
@@ -39,5 +36,7 @@ "typescript": "^1.6.2", | ||
"clean": "rimraf lib && rimraf test/build && rimraf test/coverage", | ||
"clean:example": "rimraf example/bundle.js && rimraf example/node_modules/phosphor-keymap", | ||
"build:example": "cd example && npm install && webpack --config ./webpack.conf.js", | ||
"build": "tsc --project src", | ||
"clean:example": "rimraf example/bundle.js rimraf example/index.js && rimraf example/node_modules/phosphor-keymap", | ||
"build:example": "cd example && npm install && tsc && webpack --config ./webpack.conf.js", | ||
"build:src": "tsc --project src", | ||
"build:test": "tsc --project test/src && webpack --config test/webpack.conf.js", | ||
"build": "npm run build:src && npm run build:test", | ||
"docs": "rimraf docs/api && typedoc --options scripts/tdoptions.json", | ||
@@ -47,3 +46,3 @@ "postinstall": "npm dedupe", | ||
"test:chrome": "karma start --browsers=Chrome test/karma.conf.js", | ||
"test:coverage": "karma start test/karma-cov.conf.js", | ||
"test:coverage": "webpack --config test/webpack-cov.conf.js && karma start test/karma-cov.conf.js", | ||
"test:firefox": "karma start --browsers=Firefox test/karma.conf.js", | ||
@@ -59,8 +58,4 @@ "test:ie": "karma start --browsers=IE test/karma.conf.js", | ||
"files": [ | ||
"lib/index.js", | ||
"lib/index.d.ts", | ||
"lib/keyboard.js", | ||
"lib/keyboard.d.ts", | ||
"lib/manager.js", | ||
"lib/manager.d.ts" | ||
"lib/*.d.ts", | ||
"lib/*.js" | ||
], | ||
@@ -67,0 +62,0 @@ "keywords": [ |
36308
17
971
+ Addedphosphor-command@0.9.0(transitive)
- Removedphosphor-command@0.8.0(transitive)
Updatedphosphor-command@^0.9.0