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.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # resolve-cwd [![Build Status](https://travis-ci.org/sindresorhus/resolve-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/resolve-cwd)
  2. > Resolve the path of a module like [`require.resolve()`](https://nodejs.org/api/globals.html#globals_require_resolve) but from the current working directory
  3. ## Install
  4. ```
  5. $ npm install resolve-cwd
  6. ```
  7. ## Usage
  8. ```js
  9. const resolveCwd = require('resolve-cwd');
  10. console.log(__dirname);
  11. //=> '/Users/sindresorhus/rainbow'
  12. console.log(process.cwd());
  13. //=> '/Users/sindresorhus/unicorn'
  14. console.log(resolveCwd('./foo'));
  15. //=> '/Users/sindresorhus/unicorn/foo.js'
  16. ```
  17. ## API
  18. ### resolveCwd(moduleId)
  19. Like `require()`, throws when the module can't be found.
  20. ### resolveCwd.silent(moduleId)
  21. Returns `undefined` instead of throwing when the module can't be found.
  22. #### moduleId
  23. Type: `string`
  24. What you would use in `require()`.
  25. ## Related
  26. - [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module from a given path
  27. - [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path
  28. - [import-cwd](https://github.com/sindresorhus/import-cwd) - Import a module from the current working directory
  29. - [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point
  30. - [import-lazy](https://github.com/sindresorhus/import-lazy) - Import a module lazily
  31. - [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module
  32. ## License
  33. MIT © [Sindre Sorhus](https://sindresorhus.com)