Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
432 B

  1. 'use strict';
  2. const findUp = require('find-up');
  3. const readPkg = require('read-pkg');
  4. module.exports = opts => {
  5. return findUp('package.json', opts).then(fp => {
  6. if (!fp) {
  7. return {};
  8. }
  9. return readPkg(fp, opts).then(pkg => ({pkg, path: fp}));
  10. });
  11. };
  12. module.exports.sync = opts => {
  13. const fp = findUp.sync('package.json', opts);
  14. if (!fp) {
  15. return {};
  16. }
  17. return {
  18. pkg: readPkg.sync(fp, opts),
  19. path: fp
  20. };
  21. };