Skip to content

Commit 5e01516

Browse files
committed
Update command.
1 parent f873307 commit 5e01516

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

build/compile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ function CreateDatajs(dt_path,callback){
276276
json["p"] = md_path.replace(/\.md$/,'').replace(path_md,'');
277277
// 命令描述
278278
var des = str.match(/\n==={1,}([\s\S]*?)##/i);
279+
if (!des) {
280+
console.log('格式错误:', error(md_path));
281+
}
279282
des = des[1]?des[1].replace(/\n/g,''):des[1];
280283
des = des.replace(/\r/g,'')
281284
json["d"] = des;
@@ -289,10 +292,7 @@ function CreateDatajs(dt_path,callback){
289292
//生成数据文件
290293
fs.writeFile(dt_path, 'var linux_commands='+JSON.stringify(indexes) , 'utf8',function(err){
291294
console.log(success("\n → ")+"生成数据成功!"+dt_path+" \n ");
292-
293-
294295
path_dist = path.join(path_dist,'data.json')
295-
296296
fs.writeFile(path_dist, JSON.stringify(command_data) , 'utf8',function(err){
297297
console.log(success("\n → ")+"生成数据成功!"+path_dist+" \n ");
298298
callback&&callback(dt_path,indexes);

build/deploy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if(fs.existsSync(deploy_path)){
1515
var load = loading(' Pushing code!!')
1616
load.start();
1717
ghpages.publish(deploy_path,{
18-
repo: 'https://github.com/jaywcjlove/linux-command.git',
18+
repo: 'git@github.com:jaywcjlove/linux-command.git',
1919
branch: 'gh-pages',
2020
message: 'Linux command index, Compiler generation page ' + new Date()
2121
}, function(err) {

0 commit comments

Comments
 (0)