Skip to content

Commit

Permalink
fix: 路径错误
Browse files Browse the repository at this point in the history
  • Loading branch information
lwg529 committed Jul 2, 2018
1 parent ed07ded commit 2c0eb87
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const projectPath = process.cwd();
const utils = require('../utils');
const initPath = path.resolve(__dirname, '../init');
const docsPath = path.resolve(projectPath, 'docs');
const initConfig = path.resolve(__dirname, '../ydoc.js');
const initConfig = path.resolve(__dirname, '../../ydoc.js');
const projectConfig = path.resolve(projectPath, 'ydoc.js');
const initydoc = require('../initydoc');

Expand Down
5 changes: 2 additions & 3 deletions src/initydoc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
const utils = require("./utils");
const readline = require('readline-sync');
const readlineSync = require('readline-sync');
const initConfig = ['title', 'description', 'author'];

function initYdoc() {
const projectPath = utils.projectPath;
const configFilepath = utils.getConfigPath(projectPath);
let config = utils.getConfig(configFilepath);

initConfig.forEach((item) => {
const input = readline(`your document ${item} :`);
const input = readlineSync.question(`your document ${item} :`);
if(input !== '') {
config[item] = input;
}
Expand Down
2 changes: 1 addition & 1 deletion ydoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ module.exports = {

},
dist: '_site',
version: require('./package.json').version
// version: require('./package.json').version
}

0 comments on commit 2c0eb87

Please sign in to comment.