Skip to content
Snippets Groups Projects
Commit 3ed3da8b authored by syuilo's avatar syuilo
Browse files

いい感じに

parent cfffbc61
No related branches found
No related tags found
No related merge requests found
const fs = require('fs');
const path = require('path');
const yaml = require('js-yaml');
const inquirer = require('inquirer');
const chalk = require('chalk');
const configDirPath = `${__dirname}/../.config`;
const configPath = `${configDirPath}/default.yml`;
......@@ -170,12 +172,12 @@ inquirer.prompt(form).then(as => {
}
};
console.log(`Thanks. Writing the configuration to ${configPath}`);
console.log(`Thanks. Writing the configuration to ${chalk.bold(path.resolve(configPath))}`);
try {
fs.mkdirSync(configDirPath);
fs.writeFileSync(configPath, yaml.dump(conf));
console.log('Well done.');
console.log(chalk.green('Well done.'));
} catch (e) {
console.error(e);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment