0
votes

I have migrated from tsd to typings. And am in the process of converting my gulpfile.js to gulpfile.ts. Hence I would like to use type definitions for such things as 'gulp-rename', 'gulp-uglify' etc.

In the case of 'gulp-uglify' it appears that the type definition exists:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/gulp-uglify/gulp-uglify.d.ts

And if I run the command typings search gulp-uglify I get the following response:

NAME        SOURCE HOMEPAGE                                  DESCRIPTION VERSIONS UPDATED
gulp-uglify dt     https://github.com/terinjokes/gulp-uglify             1        2016-03-16T15:55:26.000Z

My question is how do I install this type definition? I have tried variations of the following:

typings install gulp-uglify --save
typings install gh~gulp-uglify --save
typings install dt~gulp-uglify --save
typings install github~gulp-uglify --save

No luck. Getting variations of 'Unable to find "gulp-uglify" ("npm") in the registry'
Any ideas what I am doing wrong?

1
what version of typings do you use?Aleksey L.
@AlekseyL. am running the latest version of typings: 1.3.1brando
@AlekseyL. well, it turns out, when I checked the version of typings from the command line (typings -v) it showed 0.8.1, whereas in package.json it showed 1.3.1. I did a 'npm install typings -g' from the command line which updated typings globally to 1.3.1. NOW IT WORKS! Thx for the hintbrando

1 Answers

1
votes

Try

typings install dt~gulp-uglify --global --save

Though you might want to use "--save-dev" for "gulp-uglify"

Make sure you use latest version of typings (currenctly that would be 1.3.1)