ingenieux / aws-sdk-typescript

Typescript Bindings Generator for the AWS JavaScript SDK
Apache License 2.0
40 stars 40 forks source link

typings support: is there a way to install it via typings? #9

Closed Bnaya closed 8 years ago

Bnaya commented 8 years ago

I've found a way to do so, you need to install the wished files one by one, and the files it reference. Lets say i want aws-s3.d.ts that references aws-sdk-common.d.ts

I will do

typings i aws-sdk-common=https://github.com/ingenieux/aws-sdk-typescript/raw/59d1093/output/typings/aws-sdk-common.d.ts -A

and

typings i aws-sdk-s3=https://github.com/ingenieux/aws-sdk-typescript/raw/59d1093/output/typings/aws-sdk-s3.d.ts -A

on the typings.json it will look like:

...
  "ambientDependencies": {
    "aws-sdk-common": "https://github.com/ingenieux/aws-sdk-typescript/raw/59d1093/output/typings/aws-sdk-common.d.ts",
    "aws-sdk-s3": "https://github.com/ingenieux/aws-sdk-typescript/raw/59d1093/output/typings/aws-s3.d.ts",
...

Important: the 59d1093 in the URL is the commit hash, to lock the file to specific commit. it can be also branch (like master but then it might change without notice) or tag

aldrinleal commented 8 years ago

I have optimized it a little, so just typing:

$ typings i aws-sdk=github:ingenieux/aws-sdk-typescript --save-dev --verbose

Should do the trick. It also fixes the cognito stuff as well.

Bnaya commented 8 years ago

awesome, Thanks! I think that you can set the name in the typings.json to aws-sdk and then you won't need to specify the name on install

aldrinleal commented 8 years ago

I'm a noob when it comes to typings. Can you help me figure it out?

-- Aldrin Leal, aldrin@leal.eng.br / http://about.me/aldrinleal

On Thu, Mar 24, 2016 at 4:14 AM, Bnaya Peretz notifications@github.com wrote:

awesome, Thanks! I think that you can set the name in the typings.json to aws-sdk and then you won't need to specify the name on install

— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/ingenieux/aws-sdk-typescript/issues/9#issuecomment-200748726

Bnaya commented 8 years ago

check the pr, I'm also noob in all of the typescript things, I will check what is the proper way to publish it to the typings registry