Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TS][Angular] changed the package install instructions to install the .tgz package #1989

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MBcom thanks for the PR

cc @kay-schecker for review as well

{{/useNgPackagr}}
```

_It's important to take the tgz file, otherwise you'll get trouble with links on windows_

_using `npm link`:_

{{#useNgPackagr}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class FakeService {
let headers = this.defaultHeaders;

// to determine the Accept header
let httpHeaderAccepts: string[] = [
const httpHeaderAccepts: string[] = [
];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class Configuration {
return undefined;
}

let type = contentTypes.find(x => this.isJsonMime(x));
const type = contentTypes.find((x: string) => this.isJsonMime(x));
if (type === undefined) {
return contentTypes[0];
}
Expand All @@ -55,7 +55,7 @@ export class Configuration {
return undefined;
}

let type = accepts.find(x => this.isJsonMime(x));
const type = accepts.find((x: string) => this.isJsonMime(x));
if (type === undefined) {
return accepts[0];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ export interface Return {
*/
_return?: number;
}

Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion samples/client/petstore/typescript-angular-v2/npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion samples/client/petstore/typescript-angular-v4/npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down