Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Preserve license and engine
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed Jan 19, 2012
1 parent 6b7f816 commit d78c259
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/police/ask.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@ ask.fields = function (pkg, fields, callback) {
pkg.licenses = [{type: pkg.licenses, url: ask.gh.repo.html_url + '/raw/master/LICENSE'}];
}

if (pkg.license) {
if (typeof pkg.license == 'object') pkg.licenses = pkg.license;
delete pkg.license;
}

if (pkg.engine) {
pkg.engines = pkg.engine;
delete pkg.engine;
}

police.github.write(JSON.stringify(ask.sort(pkg), null, 2) + '\n', callback);
});
});
Expand Down

0 comments on commit d78c259

Please sign in to comment.