From 945c9a1406dfdf8366ba802c0349c7800ebc7949 Mon Sep 17 00:00:00 2001 From: Anton Savchenko Date: Sun, 18 Sep 2016 22:41:29 -0400 Subject: [PATCH] [typescript-angular2] npm publish missing files (#3791) * [typescript-angular2] npm publish missing files * [typescript-angular2] build to dist folder --- .../resources/typescript-angular2/package.mustache | 9 +++------ .../client/petstore/typescript-angular2/npm/README.md | 4 ++-- .../petstore/typescript-angular2/npm/package.json | 11 ++++------- .../petstore/typescript-angular2/npm/variables.ts | 3 +++ 4 files changed, 12 insertions(+), 15 deletions(-) create mode 100644 samples/client/petstore/typescript-angular2/npm/variables.ts diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular2/package.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular2/package.mustache index 6527831e62..5978cd38d3 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular2/package.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular2/package.mustache @@ -7,13 +7,10 @@ "swagger-client" ], "license": "Apache-2.0", - "files": [ - "lib" - ], - "main": "./lib/index.js", - "typings": "./lib/index.d.ts", + "main": "dist/index.js", + "typings": "dist/index.d.ts", "scripts": { - "build": "typings install && tsc", + "build": "typings install && tsc --outDir dist/", "postinstall": "npm run build" }, "peerDependencies": { diff --git a/samples/client/petstore/typescript-angular2/npm/README.md b/samples/client/petstore/typescript-angular2/npm/README.md index edd0f5d4a5..e39fefa413 100644 --- a/samples/client/petstore/typescript-angular2/npm/README.md +++ b/samples/client/petstore/typescript-angular2/npm/README.md @@ -1,4 +1,4 @@ -## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201609121640 +## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201609141041 ### Building @@ -19,7 +19,7 @@ navigate to the folder of your consuming project and run one of next commando's. _published:_ ``` -npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201609121640 --save +npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201609141041 --save ``` _unPublished (not recommended):_ diff --git a/samples/client/petstore/typescript-angular2/npm/package.json b/samples/client/petstore/typescript-angular2/npm/package.json index 3a6aa66977..38d6770e28 100644 --- a/samples/client/petstore/typescript-angular2/npm/package.json +++ b/samples/client/petstore/typescript-angular2/npm/package.json @@ -1,19 +1,16 @@ { "name": "@swagger/angular2-typescript-petstore", - "version": "0.0.1-SNAPSHOT.201609121640", + "version": "0.0.1-SNAPSHOT.201609141041", "description": "swagger client for @swagger/angular2-typescript-petstore", "author": "Swagger Codegen Contributors", "keywords": [ "swagger-client" ], "license": "Apache-2.0", - "files": [ - "lib" - ], - "main": "./lib/index.js", - "typings": "./lib/index.d.ts", + "main": "dist/index.js", + "typings": "dist/index.d.ts", "scripts": { - "build": "typings install && tsc", + "build": "typings install && tsc --outDir dist/", "postinstall": "npm run build" }, "peerDependencies": { diff --git a/samples/client/petstore/typescript-angular2/npm/variables.ts b/samples/client/petstore/typescript-angular2/npm/variables.ts new file mode 100644 index 0000000000..27b987e9b2 --- /dev/null +++ b/samples/client/petstore/typescript-angular2/npm/variables.ts @@ -0,0 +1,3 @@ +import { OpaqueToken } from '@angular/core'; + +export const BASE_PATH = new OpaqueToken('basePath'); \ No newline at end of file