Skip to content

Commit

Permalink
changed tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspaonrocks committed Jan 12, 2018
1 parent ebb2e1f commit 47068d3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
1 change: 0 additions & 1 deletion dist/route-mapper/map.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/// <reference types="express" />
import { Router } from 'express';
export default function (context: string, config: any, dirName: string): Router;
9 changes: 3 additions & 6 deletions dist/route-mapper/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ const error_handler_1 = require("../utils/error-handler");
function default_1(context, config, dirName) {
let router = express_1.Router();
let modulesIndex;
let setModules = () => {
return index_1.default(context, dirName).then(result => {
return modulesIndex = result;
});
};
setModules();
index_1.default(context, dirName).then(result => {
modulesIndex = result;
});
let utils = utils_1.default;
let handler = new error_handler_1.default();
const RoutesMapping = {
Expand Down
2 changes: 1 addition & 1 deletion test/mapper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let customConfig = {
};

// Instantiate new Router object with the context as parameter
let router = new Router(process.cwd(), customConfig);
let router = new Router(__dirname, customConfig);

const createStubServer = require('./stub/stubServer');
let server, request;
Expand Down
21 changes: 12 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"declaration": true,
"outDir": "./dist"
},
"include": [
"./src/**/*"
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"declaration": true,
"outDir": "./dist",
"types": [
"node"
]
}
},
"include": [
"./src/**/*"
]
}

0 comments on commit 47068d3

Please sign in to comment.