From 019cde72caf438e0051dc145ca538a39b158d81d Mon Sep 17 00:00:00 2001 From: MBcom <27956078+MBcom@users.noreply.github.com> Date: Mon, 18 Feb 2019 14:32:30 +0100 Subject: [PATCH] =?UTF-8?q?changed=20the=20package=20install=20instruction?= =?UTF-8?q?s=20to=20install=20the=20.tgz=20package=20=E2=80=A6=20(#1989)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * changed the package install instructions to install the .tgz package instead of symlinking the package - otherwise you'll get trouble with links on windows * samples added * added samples --- .../src/main/resources/typescript-angular/README.mustache | 6 ++++-- .../src/main/resources/typescript-angular/package.mustache | 3 +-- .../petstore-security-test/typescript-angular/README.md | 4 +++- .../client/petstore/typescript-angular-v2/default/README.md | 4 +++- samples/client/petstore/typescript-angular-v2/npm/README.md | 4 +++- .../client/petstore/typescript-angular-v2/npm/package.json | 3 +-- .../typescript-angular-v2/with-interfaces/README.md | 4 +++- .../client/petstore/typescript-angular-v4.3/npm/README.md | 4 +++- samples/client/petstore/typescript-angular-v4/npm/README.md | 4 +++- .../builds/default/README.md | 4 +++- .../builds/with-npm/README.md | 4 +++- .../builds/default/README.md | 4 +++- .../builds/with-npm/README.md | 4 +++- .../builds/default/README.md | 4 +++- .../builds/with-npm/README.md | 4 +++- .../builds/default/README.md | 4 +++- .../builds/with-npm/README.md | 4 +++- 17 files changed, 48 insertions(+), 20 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache index ad56f190c416..9778346d6d40 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache @@ -31,13 +31,15 @@ _without publishing (not recommended):_ ``` {{#useNgPackagr}} -npm install PATH_TO_GENERATED_PACKAGE/dist --save +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save {{/useNgPackagr}} {{^useNgPackagr}} -npm install PATH_TO_GENERATED_PACKAGE --save +npm install PATH_TO_GENERATED_PACKAGE/{{npmName}}-{{npmVersion}}.tgz --save {{/useNgPackagr}} ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ {{#useNgPackagr}} diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache index c2642d8f6f90..d57ec62e8d83 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache @@ -18,8 +18,7 @@ "module": "dist/index.js", "typings": "dist/index.d.ts", "scripts": { - "build": "ngc", - "postinstall": "npm run build" + "build": "ngc && npm pack" }, {{/useNgPackagr}} "peerDependencies": { diff --git a/samples/client/petstore-security-test/typescript-angular/README.md b/samples/client/petstore-security-test/typescript-angular/README.md index b6c812a56efc..6fdf5e362fed 100644 --- a/samples/client/petstore-security-test/typescript-angular/README.md +++ b/samples/client/petstore-security-test/typescript-angular/README.md @@ -25,9 +25,11 @@ npm install @ --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE --save +npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE: diff --git a/samples/client/petstore/typescript-angular-v2/default/README.md b/samples/client/petstore/typescript-angular-v2/default/README.md index ae7f5c307e42..c84c27deabaa 100644 --- a/samples/client/petstore/typescript-angular-v2/default/README.md +++ b/samples/client/petstore/typescript-angular-v2/default/README.md @@ -25,9 +25,11 @@ npm install @ --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE --save +npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE: diff --git a/samples/client/petstore/typescript-angular-v2/npm/README.md b/samples/client/petstore/typescript-angular-v2/npm/README.md index 0239b2b8e0bb..a994f6c32fcd 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/README.md +++ b/samples/client/petstore/typescript-angular-v2/npm/README.md @@ -25,9 +25,11 @@ npm install @swagger/angular2-typescript-petstore@0.0.1 --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE --save +npm install PATH_TO_GENERATED_PACKAGE/@swagger/angular2-typescript-petstore-0.0.1.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE: diff --git a/samples/client/petstore/typescript-angular-v2/npm/package.json b/samples/client/petstore/typescript-angular-v2/npm/package.json index faed92258ca6..23f4a985d131 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/package.json +++ b/samples/client/petstore/typescript-angular-v2/npm/package.json @@ -12,8 +12,7 @@ "module": "dist/index.js", "typings": "dist/index.d.ts", "scripts": { - "build": "ngc", - "postinstall": "npm run build" + "build": "ngc && npm pack" }, "peerDependencies": { "@angular/core": "^2.0.0", diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md b/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md index ae7f5c307e42..c84c27deabaa 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md @@ -25,9 +25,11 @@ npm install @ --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE --save +npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE: diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/README.md b/samples/client/petstore/typescript-angular-v4.3/npm/README.md index 642463481577..5c6afb247f9c 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/README.md +++ b/samples/client/petstore/typescript-angular-v4.3/npm/README.md @@ -25,9 +25,11 @@ npm install @swagger/angular2-typescript-petstore@0.0.1 --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE/dist --save +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE/dist: diff --git a/samples/client/petstore/typescript-angular-v4/npm/README.md b/samples/client/petstore/typescript-angular-v4/npm/README.md index 867df4b48fbd..e19758a3a858 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/README.md +++ b/samples/client/petstore/typescript-angular-v4/npm/README.md @@ -25,9 +25,11 @@ npm install @swagger/angular2-typescript-petstore@0.0.1 --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE/dist --save +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE/dist: diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/README.md index b6c812a56efc..6fdf5e362fed 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/README.md @@ -25,9 +25,11 @@ npm install @ --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE --save +npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE: diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md index a1d8a9592d8b..cc77efb8f00a 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md @@ -25,9 +25,11 @@ npm install @swagger/typescript-angular-petstore@1.0.0 --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE/dist --save +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE/dist: diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/README.md index b6c812a56efc..6fdf5e362fed 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/README.md @@ -25,9 +25,11 @@ npm install @ --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE --save +npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE: diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md index a1d8a9592d8b..cc77efb8f00a 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md @@ -25,9 +25,11 @@ npm install @swagger/typescript-angular-petstore@1.0.0 --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE/dist --save +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE/dist: diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/README.md index b6c812a56efc..6fdf5e362fed 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/README.md @@ -25,9 +25,11 @@ npm install @ --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE --save +npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE: diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md index a1d8a9592d8b..cc77efb8f00a 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md @@ -25,9 +25,11 @@ npm install @swagger/typescript-angular-petstore@1.0.0 --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE/dist --save +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE/dist: diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/README.md index b6c812a56efc..6fdf5e362fed 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/README.md @@ -25,9 +25,11 @@ npm install @ --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE --save +npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE: diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/README.md index a1d8a9592d8b..cc77efb8f00a 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/README.md @@ -25,9 +25,11 @@ npm install @swagger/typescript-angular-petstore@1.0.0 --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE/dist --save +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save ``` +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + _using `npm link`:_ In PATH_TO_GENERATED_PACKAGE/dist: