diff --git a/lib/hexo/scaffold.js b/lib/hexo/scaffold.js index f1e83c0cf1..c1d59f2aa2 100644 --- a/lib/hexo/scaffold.js +++ b/lib/hexo/scaffold.js @@ -26,7 +26,7 @@ class Scaffold { if (!exist) return []; return listDir(scaffoldDir, { - ignoreFilesRegex: /^_|\/_/ + ignorePattern: /^_|\/_/ }); }).map(item => ({ name: item.substring(0, item.length - extname(item).length), diff --git a/lib/plugins/console/generate.js b/lib/plugins/console/generate.js index a95abb0e15..261ba40132 100644 --- a/lib/plugins/console/generate.js +++ b/lib/plugins/console/generate.js @@ -133,7 +133,7 @@ class Generater { // Check the public folder return stat(publicDir).then(stats => { if (!stats.isDirectory()) { - throw new Error('%s is not a directory', magenta(tildify(publicDir))); + throw new Error(`${magenta(tildify(publicDir))} is not a directory`); } }).catch(err => { // Create public folder if not exists