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.

readme.md 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # read-pkg [![Build Status](https://travis-ci.org/sindresorhus/read-pkg.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg)
  2. > Read a package.json file
  3. ## Why
  4. - [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)
  5. - [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
  6. - [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)
  7. ## Install
  8. ```
  9. $ npm install read-pkg
  10. ```
  11. ## Usage
  12. ```js
  13. const readPkg = require('read-pkg');
  14. (async () => {
  15. console.log(await readPkg());
  16. //=> {name: 'read-pkg', …}
  17. console.log(await readPkg({cwd: 'some-other-directory'}));
  18. //=> {name: 'unicorn', …}
  19. })();
  20. ```
  21. ## API
  22. ### readPkg(options?)
  23. Returns a `Promise<object>` with the parsed JSON.
  24. ### readPkg.sync(options?)
  25. Returns the parsed JSON.
  26. #### options
  27. Type: `object`
  28. ##### cwd
  29. Type: `string`<br>
  30. Default: `process.cwd()`
  31. Current working directory.
  32. ##### normalize
  33. Type: `boolean`<br>
  34. Default: `true`
  35. [Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
  36. ## Related
  37. - [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file
  38. - [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file
  39. - [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file
  40. ---
  41. <div align="center">
  42. <b>
  43. <a href="https://tidelift.com/subscription/pkg/npm-read-pkg?utm_source=npm-read-pkg&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
  44. </b>
  45. <br>
  46. <sub>
  47. Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
  48. </sub>
  49. </div>