Skip to content

Commit

Permalink
Update command.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 8, 2018
1 parent f873307 commit 5e01516
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions build/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ function CreateDatajs(dt_path,callback){
json["p"] = md_path.replace(/\.md$/,'').replace(path_md,'');
// 命令描述
var des = str.match(/\n==={1,}([\s\S]*?)##/i);
if (!des) {
console.log('格式错误:', error(md_path));
}
des = des[1]?des[1].replace(/\n/g,''):des[1];
des = des.replace(/\r/g,'')
json["d"] = des;
Expand All @@ -289,10 +292,7 @@ function CreateDatajs(dt_path,callback){
//生成数据文件
fs.writeFile(dt_path, 'var linux_commands='+JSON.stringify(indexes) , 'utf8',function(err){
console.log(success("\n → ")+"生成数据成功!"+dt_path+" \n ");


path_dist = path.join(path_dist,'data.json')

fs.writeFile(path_dist, JSON.stringify(command_data) , 'utf8',function(err){
console.log(success("\n → ")+"生成数据成功!"+path_dist+" \n ");
callback&&callback(dt_path,indexes);
Expand Down
2 changes: 1 addition & 1 deletion build/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(fs.existsSync(deploy_path)){
var load = loading(' Pushing code!!')
load.start();
ghpages.publish(deploy_path,{
repo: 'https://github.com/jaywcjlove/linux-command.git',
repo: 'git@github.com:jaywcjlove/linux-command.git',
branch: 'gh-pages',
message: 'Linux command index, Compiler generation page ' + new Date()
}, function(err) {
Expand Down

0 comments on commit 5e01516

Please sign in to comment.