mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-27 05:30:14 +08:00
26 lines
844 B
JavaScript
26 lines
844 B
JavaScript
'use strict';
|
|
|
|
var _stringify = require('babel-runtime/core-js/json/stringify');
|
|
|
|
var _stringify2 = _interopRequireDefault(_stringify);
|
|
|
|
var _path = require('path');
|
|
|
|
var _path2 = _interopRequireDefault(_path);
|
|
|
|
var _fsExtra = require('fs-extra');
|
|
|
|
var _fsExtra2 = _interopRequireDefault(_fsExtra);
|
|
|
|
var _config = require('../config.js');
|
|
|
|
var _config2 = _interopRequireDefault(_config);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var runtimePath = _config2.default.runtime_path;
|
|
_fsExtra2.default.ensureDirSync(runtimePath);
|
|
_fsExtra2.default.ensureDirSync(_path2.default.join(runtimePath, 'log'));
|
|
var configPath = _path2.default.join(runtimePath, 'config.json');
|
|
|
|
_fsExtra2.default.writeFileSync(configPath, (0, _stringify2.default)(_config2.default, null, '\t'), { encoding: 'utf8' }); |