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.

createIgnorer.js 698B

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _fs = require("fs");
  7. var _path = require("path");
  8. var _ignore = _interopRequireDefault(require("ignore"));
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. var _default = (directory, filename = '.prettierignore') => {
  11. const file = (0, _path.join)(directory, filename);
  12. if ((0, _fs.existsSync)(file)) {
  13. const text = (0, _fs.readFileSync)(file, 'utf8');
  14. const filter = (0, _ignore.default)().add(text).createFilter();
  15. return path => filter((0, _path.join)(path));
  16. }
  17. return () => true;
  18. };
  19. exports.default = _default;