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 536B

123456789101112131415161718192021222324
  1. 'use strict';
  2. /*
  3. Copyright 2012-2015, Yahoo Inc.
  4. Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
  5. */
  6. const path = require('path');
  7. module.exports = {
  8. create(name, cfg) {
  9. cfg = cfg || {};
  10. let Cons;
  11. try {
  12. Cons = require(path.join(__dirname, 'lib', name));
  13. } catch (e) {
  14. if (e.code !== 'MODULE_NOT_FOUND') {
  15. throw e;
  16. }
  17. Cons = require(name);
  18. }
  19. return new Cons(cfg);
  20. }
  21. };