From 61188a0afa45ccd8ee65658eff1072322a4e2d04 Mon Sep 17 00:00:00 2001 From: chrisguttandin Date: Tue, 16 May 2017 21:53:09 +0200 Subject: [PATCH] add tsconfig file for node modules --- package.json | 4 +++- src/tsconfig-node.json | 7 +++++++ test/integration/module.js | 13 +++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/tsconfig-node.json diff --git a/package.json b/package.json index 006816b8..45d55124 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,9 @@ "bugs": { "url": "https://github.com/chrisguttandin/tsconfig-holy-grail/issues" }, - "dependencies": {}, + "dependencies": { + "@types/node": "^7.0.18" + }, "description": "This is just my personal collection of tsconfig files.", "devDependencies": { "chai": "^3.5.0", diff --git a/src/tsconfig-node.json b/src/tsconfig-node.json new file mode 100644 index 00000000..809806ab --- /dev/null +++ b/src/tsconfig-node.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "lib": [ "es2016" ], + "types": [ "node" ] + }, + "extends": "./tsconfig" +} diff --git a/test/integration/module.js b/test/integration/module.js index aaa85bd4..7504ee9a 100644 --- a/test/integration/module.js +++ b/test/integration/module.js @@ -21,6 +21,19 @@ describe('tsconfig-holy-grail', () => { }); + describe('tsconfig-node.json', () => { + + let path; + + beforeEach(() => path = 'tsconfig-node.json'); + + it('should be a parsable config file', () => { + return load(cwd, path) + .then(({ config, path }) => parseJsonConfigFileContent(config, sys, dirname(path), null, path)); + }); + + }); + describe('tsconfig-universal.json', () => { let path;