DefinitelyTyped / grunt-tsd

Grunt plugin to automate TSD and TypeScript definition related tasks
MIT License
16 stars 8 forks source link

grunt-tsd is updaing bundle file on reinstall #9

Open giggio opened 9 years ago

giggio commented 9 years ago

This is my grunt config for grunt-tsd:

{
        tsd: {
            reinstall: {
                options: {
                    command: 'reinstall',
                    latest: false,
                    config: 'tsd.json'
                }
            }
        }
}

It always changes my tsd.d.ts, which is really simple:

/// <reference path="tsd/jquery/jquery.d.ts" />
/// <reference path="tsd/winjs/winjs.d.ts" />

It changes it to:

/// <reference path="tsd/tsd/jquery/jquery.d.ts" />
/// <reference path="tsd/tsd/winjs/winjs.d.ts" />
/// <reference path="tsd/jquery/jquery.d.ts" />
/// <reference path="tsd/winjs/winjs.d.ts" />

The first two lines are invalid, they are a incorrect paths.

If I run tsd reinstall this does not happen.

This is my tsd.json:

{
  "version": "v4",
  "repo": "borisyankov/DefinitelyTyped",
  "ref": "master",
  "path": "wwwroot/ts/typings/tsd",
  "bundle": "wwwroot/ts/typings/tsd.d.ts",
  "installed": {
    "winjs/winjs.d.ts": {
      "commit": "0d595e843d872c24d8f45dd7df9c15404e6daff4"
    },
    "jquery/jquery.d.ts": {
      "commit": "0d595e843d872c24d8f45dd7df9c15404e6daff4"
    }
  }
}
matthiasarn commented 9 years ago

I face the exact same problem. Do you have any solution for that? thx

giggio commented 9 years ago

Not yet. Always manually updating the file. :(

matthiasarn commented 9 years ago

It seems that it is an issue of the tsd compiler itself and not from the grunt-tsd. I just used the following command inside the CLI: $ tsd update --save --overwrite and it turns out that the tsd compiler duplicates the path as well.