Skip to content

Instantly share code, notes, and snippets.

@mcfog
Created June 12, 2013 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcfog/5765208 to your computer and use it in GitHub Desktop.
Save mcfog/5765208 to your computer and use it in GitHub Desktop.
`hexo new` 后自动打开新建的文件

用法:将open.js放入scripts目录下,然后在你的hexo目录中打开cmd,执行

npm i open

即可

var open = require('open');
hexo.on('new', function(target) {
open(target);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment