Skip to content

Commit

Permalink
Write annotated package.json data back to package.json
Browse files Browse the repository at this point in the history
Mostly so that we can use the _from data in shrinkwrap and ls later.
  • Loading branch information
isaacs committed Feb 29, 2012
1 parent 8cf5f34 commit 50142da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/install.js
Expand Up @@ -715,6 +715,9 @@ function write (target, targetFolder, context, cb_) {
chain
( [ [ cache.unpack, target.name, target.version, targetFolder
, null, null, user, group ]
, [ fs, "writeFile"
, path.resolve(targetFolder, "package.json")
, JSON.stringify(target, null, 2) + "\n" ]
, [ lifecycle, target, "preinstall", targetFolder ] ]

// nest the chain so that we can throw away the results returned
Expand Down

0 comments on commit 50142da

Please sign in to comment.