From 0c98c64d37a0d20790a65d54d737272832c693cc Mon Sep 17 00:00:00 2001 From: Gerhard Preuss Date: Fri, 7 Apr 2017 11:28:08 +0200 Subject: [PATCH 1/2] add typings, typescript as dev deps, use standard prepublish script --- package.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2177525..7ef2c39 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,7 @@ "main": "./index.js", "typings": "./index.d.ts", "scripts": { - "precontrib": "npm install -g typings typescript && npm install", - "contrib": "typings install && tsc" + "prepublish": "typings install && tsc" }, "author": "PowerBI (https://dev.powerbi.com)", "license": "MIT", @@ -20,7 +19,10 @@ "ms-rest": "^1.12.0", "powerbi-api": "^1.2" }, - "devDependencies": {}, + "devDependencies": { + "typescript": "^2.2.2", + "typings": "^2.1.0" + }, "repository": { "type": "git", "url": "git+https://github.com/Microsoft/PowerBI-Cli.git" From db629d1ba29bedf5ec2f0d26ed57bff2e3b2808f Mon Sep 17 00:00:00 2001 From: Gerhard Preuss Date: Fri, 7 Apr 2017 11:31:34 +0200 Subject: [PATCH 2/2] adapt contribution guide --- CONTRIBUTING.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f13529d..b24cd70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,18 +9,26 @@ git clone https://github.com/Microsoft/PowerBI-Cli.git powerbi-cli Navigate to the cloned directory -Install typescript and local dependencies - you need to run it only once. +Install dependencies and dev-dependencies. ``` -npm run precontrib +npm i ``` ## Build: ``` -npm run contrib +npm run prepublish ``` -## Running the CLI +## Install CLI from local repository: + +In root git repository directory: + +``` +npm i -g +``` + +## Running the CLI without installation Navigate to `/bin` directory and run cli file using node. @@ -28,7 +36,7 @@ Navigate to `/bin` directory and run cli file using node. cd bin & node cli ``` -## Running specific command: +### Running specific command: Navigate to `/bin` directory and run specific cli file using node. Example: