UNPKG

git-repository

Version:

A Promise-based wrapper library for Git CLI

38 lines (30 loc) 847 B
/** * Copyright © 2015 Konstantin Tarkus. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs); function exists(path) { return new Promise(function (resolve) { _fs2['default'].exists(path, resolve); }); } function mkdir(path) { return new Promise(function (resolve, reject) { _fs2['default'].mkdir(path, function (err) { return err ? reject(err) : resolve(); }); }); } exports['default'] = { exists: exists, mkdir: mkdir }; module.exports = exports['default'];