From b8864bf8bcce2e9840634b88a1a6050714542b9b Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Fri, 22 Apr 2016 12:45:02 -0700 Subject: [PATCH] Updated to generate js files on post npm install --- .vscode/settings.json | 11 +++++++++++ lib/index.js | 7 ------- package.json | 3 ++- tsconfig.json | 12 +++++++++--- typings.json | 5 ++--- 5 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 lib/index.js diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3ccd8d0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "files.exclude": { + "**/.git": true, + "**/.DS_Store": true, + "**/*.js.map": true, + "**/*.js": { + "when": "$(basename).ts" + } + } +} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 3493ddd..0000000 --- a/lib/index.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -__export(require('./client/powerBIClient')); -__export(require('./core/powerBIToken')); -__export(require('./core/util')); diff --git a/package.json b/package.json index e981533..3af110e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "./lib/index.js", "typings": "./lib/index.d.ts", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "mocha --recursive", + "postinstall": "typings install && tsc" }, "repository": { "type": "git", diff --git a/tsconfig.json b/tsconfig.json index 2b7ca59..0dcf644 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,16 @@ { "compilerOptions": { "module": "commonjs", - "allowJs": true, - "declaration": true + "target": "es5", + "allowJs": false, + "declaration": true, + "moduleResolution": "node", + "sourceMap": true }, "exclude": [ - "node_modules" + "node_modules", + "lib/autorest", + "typings/browser.d.ts", + "typings/browser" ] } \ No newline at end of file diff --git a/typings.json b/typings.json index 2726c19..8c4b188 100644 --- a/typings.json +++ b/typings.json @@ -1,9 +1,8 @@ { "ambientDependencies": { + "chai": "registry:dt/chai#3.4.0+20160317120654", + "jwt-simple": "registry:dt/jwt-simple#0.2.0+20160316155526", "mocha": "registry:dt/mocha#2.2.5+20160317120654", "node": "registry:dt/node#4.0.0+20160412142033" - }, - "devDependencies": { - "chai": "registry:npm/chai#3.5.0+20160415060238" } }