Lint and build in single step

This commit is contained in:
Nathan Kunicki 2017-11-18 16:47:14 +00:00
parent 414187c329
commit 1419290e7a
2 changed files with 2 additions and 3 deletions

View File

@ -3,8 +3,7 @@
"version": "0.0.1",
"description": "BittMapp - A monochrome bitmap editor",
"scripts": {
"build": "tsc",
"lint": "tslint -c tslint.json \"src/**/*.ts\""
"build": "tslint -c tslint.json \"src/**/*.ts\" && tsc"
},
"author": "Nathan Kunicki <me@nathankunicki.com>",
"license": "MIT",

View File

@ -72,7 +72,7 @@ class BittMappEditor {
this._context = this.canvas.getContext("2d") as CanvasRenderingContext2D;
const deviceRatio: number = window.devicePixelRatio;
const deviceRatio: number = window.devicePixelRatio || 1;
const backingStoreRatio: number = (this._context as any).backingStorePixelRatio as number || 1;
this._scale = deviceRatio / backingStoreRatio;