From be07bd13af4078ede875964871b370500e7bc90d Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Tue, 24 Nov 2020 21:05:07 +0100 Subject: [PATCH] Allows install typescript client via npm from Git (#7878) * 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. * Update examples for Typescript --- .../src/main/resources/typescript/package.mustache | 2 +- .../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 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/package.mustache b/modules/openapi-generator/src/main/resources/typescript/package.mustache index 0adbf68d9a1..807989026b1 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}} diff --git a/samples/openapi3/client/petstore/typescript/builds/default/package.json b/samples/openapi3/client/petstore/typescript/builds/default/package.json index aaebe4e7687..f2676763610 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 61af027719c..71908ad48ca 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 ccacdf6b715..7c35bc6c6dd 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 aaebe4e7687..f2676763610 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",