diff --git a/package.json b/package.json index d868979..28d63a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "routeros-client", - "version": "0.2.5", + "version": "0.2.6", "description": "Easy to use abstraction layer over the node-routeros API", "main": "./dist/index", "types": "./dist/index", @@ -44,13 +44,13 @@ "@types/node": "^6.0.92", "chai": "^4.1.2", "mocha": "^4.0.1", + "source-map-support": "^0.5.0", "ts-node": "^3.3.0", "tslint": "^5.7.0", "typescript": "^2.6.2" }, "dependencies": { "debug": "^3.1.0", - "source-map-support": "^0.5.0", "node-routeros": "^1.0.9" } } diff --git a/src/index.ts b/src/index.ts index 1791494..4548cec 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,7 @@ -import * as sourceMapSupport from "source-map-support"; -if (process.env.ENV !== "production") sourceMapSupport.install(); +if (process.env.ENV === "testing") { + const sourceMapSupport = require("source-map-support"); + sourceMapSupport.install(); +} export * from "./RouterOSClient"; export * from "./RosApiModel"; diff --git a/src/tslint.json b/src/tslint.json index ddae171..9c7ea76 100644 --- a/src/tslint.json +++ b/src/tslint.json @@ -13,6 +13,7 @@ "ordered-imports": false, "no-trailing-whitespace": false, "max-line-length": false, + "no-var-requires": false, "no-shadowed-variable": false, "quotemark": [true, "double", "avoid-escape", "avoid-template"] },