Permalink
Browse files

Preserve license and engine

  • Loading branch information...
1 parent 6b7f816 commit d78c259e3fae3689b44262c9030676dc10ad3984 @pksunkara committed Jan 19, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/police/ask.js
View
10 lib/police/ask.js
@@ -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);
});
});

0 comments on commit d78c259

Please sign in to comment.