From 3f9b2a96787eddd79acf790aefba525c2cadcd2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20M=C3=A6tzke=20Tandrup?= Date: Sat, 25 Jul 2015 14:11:10 +0200 Subject: [PATCH] Adding build system for typescript AngularJS sample --- .../petstore/typescript-angular/.gitignore | 3 +++ .../petstore/typescript-angular/README.md | 14 ++++++++++++++ .../petstore/typescript-angular/package.json | 19 +++++++++++++++++++ .../petstore/typescript-angular/tsconfig.json | 18 ++++++++++++++++++ .../petstore/typescript-angular/tsd.json | 15 +++++++++++++++ .../petstore/typescript-node/package.json | 3 ++- 6 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 samples/client/petstore/typescript-angular/.gitignore create mode 100644 samples/client/petstore/typescript-angular/README.md create mode 100644 samples/client/petstore/typescript-angular/package.json create mode 100644 samples/client/petstore/typescript-angular/tsconfig.json create mode 100644 samples/client/petstore/typescript-angular/tsd.json diff --git a/samples/client/petstore/typescript-angular/.gitignore b/samples/client/petstore/typescript-angular/.gitignore new file mode 100644 index 000000000000..abfad1bf5e27 --- /dev/null +++ b/samples/client/petstore/typescript-angular/.gitignore @@ -0,0 +1,3 @@ +/node_modules +/typings +/client.js \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular/README.md b/samples/client/petstore/typescript-angular/README.md new file mode 100644 index 000000000000..ba2e8d1ef851 --- /dev/null +++ b/samples/client/petstore/typescript-angular/README.md @@ -0,0 +1,14 @@ +# SwaggerClient + +Sample of TypeScript AngularJS petstore client + +## Testing the generated code + +``` +npm install +npm test +``` + +## Author + +mads@maetzke-tandrup.dk \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular/package.json b/samples/client/petstore/typescript-angular/package.json new file mode 100644 index 000000000000..1d5568b1db50 --- /dev/null +++ b/samples/client/petstore/typescript-angular/package.json @@ -0,0 +1,19 @@ +{ + "name": "petstore-typescript-node-sample", + "version": "1.0.0", + "description": "Sample of generated TypeScript petstore client", + "main": "api.js", + "scripts": { + "postinstall": "tsd reinstall", + "test": "tsc" + }, + "author": "Mads M. Tandrup", + "license": "Apache 2.0", + "dependencies": { + "angular": "^1.4.3" + }, + "devDependencies": { + "tsd": "^0.6.3", + "typescript": "^1.5.3" + } +} diff --git a/samples/client/petstore/typescript-angular/tsconfig.json b/samples/client/petstore/typescript-angular/tsconfig.json new file mode 100644 index 000000000000..c389d5011ff5 --- /dev/null +++ b/samples/client/petstore/typescript-angular/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "out": "client.js" + }, + "files": [ + "API/Client/Category.ts", + "API/Client/Pet.ts", + "API/Client/StoreApi.ts", + "API/Client/User.ts", + "API/Client/api.d.ts", + "API/Client/Order.ts", + "API/Client/PetApi.ts", + "API/Client/Tag.ts", + "API/Client/UserApi.ts", + "typings/tsd.d.ts" + ] +} diff --git a/samples/client/petstore/typescript-angular/tsd.json b/samples/client/petstore/typescript-angular/tsd.json new file mode 100644 index 000000000000..182b9f68fa2a --- /dev/null +++ b/samples/client/petstore/typescript-angular/tsd.json @@ -0,0 +1,15 @@ +{ + "version": "v4", + "repo": "borisyankov/DefinitelyTyped", + "ref": "master", + "path": "typings", + "bundle": "typings/tsd.d.ts", + "installed": { + "angularjs/angular.d.ts": { + "commit": "f6c8ca47193fb67947944a3170912672ac3e908e" + }, + "jquery/jquery.d.ts": { + "commit": "f6c8ca47193fb67947944a3170912672ac3e908e" + } + } +} diff --git a/samples/client/petstore/typescript-node/package.json b/samples/client/petstore/typescript-node/package.json index dd12b489399d..e0c2a74a47c0 100644 --- a/samples/client/petstore/typescript-node/package.json +++ b/samples/client/petstore/typescript-node/package.json @@ -14,6 +14,7 @@ "request": "^2.60.0" }, "devDependencies": { - "tsd": "^0.6.3" + "tsd": "^0.6.3", + "typescript": "^1.5.3" } }