Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Commit

Permalink
Fix name is not defined when uninstalling
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Mar 8, 2016
1 parent e57fa34 commit 0c2c0d8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 9 additions & 0 deletions custom_typings/node.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file contains patches to make `node.d.ts` compile with `noLib`.

declare class Intl {

}

declare const console: {

}
4 changes: 2 additions & 2 deletions src/uninstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function uninstallDependency (name: string, options: UninstallDependencyO

// Remove the dependency from fs and config.
function uninstall (name: string, options: UninstallDependencyOptions) {
return removeDependency(name, options).then(() => writeToConfig(options))
return removeDependency(name, options).then(() => writeToConfig(name, options))
}

return findProject(options.cwd)
Expand All @@ -40,7 +40,7 @@ export function uninstallDependency (name: string, options: UninstallDependencyO
/**
* Delete the dependency from the configuration file.
*/
function writeToConfig (options: UninstallDependencyOptions) {
function writeToConfig (name: string, options: UninstallDependencyOptions) {
if (options.save || options.saveDev) {
return transformConfig(options.cwd, config => {
if (options.save) {
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"outDir": "dist/",
"module": "commonjs",
"moduleResolution": "node",
"noLib": true,
"declaration": true,
"noImplicitAny": true,
"removeComments": true,
Expand All @@ -12,6 +13,8 @@
},
"files": [
"src/typings.ts",
"typings/main.d.ts"
"typings/main.d.ts",
"custom_typings/node.d.ts",
"node_modules/typescript/lib/lib.core.d.ts"
]
}

0 comments on commit 0c2c0d8

Please sign in to comment.