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 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # env-paths
  2. > Get paths for storing things like data, config, cache, etc
  3. Uses the correct OS-specific paths. Most developers get this wrong.
  4. ## Install
  5. ```
  6. $ npm install env-paths
  7. ```
  8. ## Usage
  9. ```js
  10. const envPaths = require('env-paths');
  11. const paths = envPaths('MyApp');
  12. paths.data;
  13. //=> '/home/sindresorhus/.local/share/MyApp-nodejs'
  14. paths.config
  15. //=> '/home/sindresorhus/.config/MyApp-nodejs'
  16. ```
  17. ## API
  18. ### paths = envPaths(name, options?)
  19. Note: It only generates the path strings. It doesn't create the directories for you. You could use [`make-dir`](https://github.com/sindresorhus/make-dir) to create the directories.
  20. #### name
  21. Type: `string`
  22. Name of your project. Used to generate the paths.
  23. #### options
  24. Type: `object`
  25. ##### suffix
  26. Type: `string`<br>
  27. Default: `'nodejs'`
  28. **Don't use this option unless you really have to!**<br>
  29. Suffix appended to the project name to avoid name conflicts with native
  30. apps. Pass an empty string to disable it.
  31. ### paths.data
  32. Directory for data files.
  33. Example locations (with the default `nodejs` [suffix](#suffix)):
  34. - macOS: `~/Library/Application Support/MyApp-nodejs`
  35. - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Data` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Data`)
  36. - Linux: `~/.local/share/MyApp-nodejs` (or `$XDG_DATA_HOME/MyApp-nodejs`)
  37. ### paths.config
  38. Directory for config files.
  39. Example locations (with the default `nodejs` [suffix](#suffix)):
  40. - macOS: `~/Library/Preferences/MyApp-nodejs`
  41. - Windows: `%APPDATA%\MyApp-nodejs\Config` (for example, `C:\Users\USERNAME\AppData\Roaming\MyApp-nodejs\Config`)
  42. - Linux: `~/.config/MyApp-nodejs` (or `$XDG_CONFIG_HOME/MyApp-nodejs`)
  43. ### paths.cache
  44. Directory for non-essential data files.
  45. Example locations (with the default `nodejs` [suffix](#suffix)):
  46. - macOS: `~/Library/Caches/MyApp-nodejs`
  47. - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Cache` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Cache`)
  48. - Linux: `~/.cache/MyApp-nodejs` (or `$XDG_CACHE_HOME/MyApp-nodejs`)
  49. ### paths.log
  50. Directory for log files.
  51. Example locations (with the default `nodejs` [suffix](#suffix)):
  52. - macOS: `~/Library/Logs/MyApp-nodejs`
  53. - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Log` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Log`)
  54. - Linux: `~/.local/state/MyApp-nodejs` (or `$XDG_STATE_HOME/MyApp-nodejs`)
  55. ### paths.temp
  56. Directory for temporary files.
  57. Example locations (with the default `nodejs` [suffix](#suffix)):
  58. - macOS: `/var/folders/jf/f2twvvvs5jl_m49tf034ffpw0000gn/T/MyApp-nodejs`
  59. - Windows: `%LOCALAPPDATA%\Temp\MyApp-nodejs` (for example, `C:\Users\USERNAME\AppData\Local\Temp\MyApp-nodejs`)
  60. - Linux: `/tmp/USERNAME/MyApp-nodejs`
  61. ---
  62. <div align="center">
  63. <b>
  64. <a href="https://tidelift.com/subscription/pkg/npm-env-paths?utm_source=npm-env-paths&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
  65. </b>
  66. <br>
  67. <sub>
  68. Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
  69. </sub>
  70. </div>