Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

index.js 581B

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. const path = require('path');
  3. const findUp = require('find-up');
  4. const readPkg = require('read-pkg');
  5. module.exports = async options => {
  6. const filePath = await findUp('package.json', options);
  7. if (!filePath) {
  8. return;
  9. }
  10. return {
  11. packageJson: await readPkg({...options, cwd: path.dirname(filePath)}),
  12. path: filePath
  13. };
  14. };
  15. module.exports.sync = options => {
  16. const filePath = findUp.sync('package.json', options);
  17. if (!filePath) {
  18. return;
  19. }
  20. return {
  21. packageJson: readPkg.sync({...options, cwd: path.dirname(filePath)}),
  22. path: filePath
  23. };
  24. };