From 79160cd38370025164e7f86066070c8a56b6fbb4 Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Wed, 4 Nov 2020 20:40:17 +0100 Subject: [PATCH 1/2] Allows install typescript client via npm from Git 'prepublishOnly' is run before the package is published. 'prepack' is run before the package is published and after installation local installation eg. via Git. --- .../src/main/resources/typescript/package.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/package.mustache b/modules/openapi-generator/src/main/resources/typescript/package.mustache index 0adbf68d9a14..807989026b14 100644 --- a/modules/openapi-generator/src/main/resources/typescript/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/package.mustache @@ -14,7 +14,7 @@ "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", - "prepublishOnly": "npm run build" + "prepare": "npm run build" }, "dependencies": { {{#frameworks}} From a5ee4bf3bbf41130c7fb816985d92409def855aa Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Tue, 17 Nov 2020 15:58:28 +0100 Subject: [PATCH 2/2] Update examples for Typescript --- .../client/petstore/typescript/builds/default/package.json | 2 +- .../client/petstore/typescript/builds/inversify/package.json | 2 +- .../client/petstore/typescript/builds/jquery/package.json | 2 +- .../petstore/typescript/builds/object_params/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/openapi3/client/petstore/typescript/builds/default/package.json b/samples/openapi3/client/petstore/typescript/builds/default/package.json index aaebe4e7687e..f26767636102 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/package.json @@ -14,7 +14,7 @@ "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", - "prepublishOnly": "npm run build" + "prepare": "npm run build" }, "dependencies": { "node-fetch": "^2.6.0", diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json index 61af027719c1..71908ad48cae 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json @@ -14,7 +14,7 @@ "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", - "prepublishOnly": "npm run build" + "prepare": "npm run build" }, "dependencies": { "node-fetch": "^2.6.0", diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json index ccacdf6b7158..7c35bc6c6dd3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json @@ -14,7 +14,7 @@ "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", - "prepublishOnly": "npm run build" + "prepare": "npm run build" }, "dependencies": { "@types/jquery": "^3.3.29", diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json index aaebe4e7687e..f26767636102 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json @@ -14,7 +14,7 @@ "typings": "./dist/index.d.ts", "scripts": { "build": "tsc", - "prepublishOnly": "npm run build" + "prepare": "npm run build" }, "dependencies": { "node-fetch": "^2.6.0",