added public_dir variable (available in the next release of hexo)
This commit is contained in:
6
index.js
6
index.js
@@ -1,5 +1,7 @@
|
||||
var spawn = require('child_process').spawn;
|
||||
|
||||
var public_dir = hexo.config.public_dir || './public';
|
||||
|
||||
// run function which supports interactive commands
|
||||
function run (command, args, callback) {
|
||||
process.stdin.pause();
|
||||
@@ -38,7 +40,7 @@ hexo.extend.deployer.register('ftp', function (args, callback) {
|
||||
|
||||
var args = [
|
||||
'-e',
|
||||
'mirror -R --ignore-time --delete -v ./public ' + config.root + '; bye',
|
||||
'mirror -R --ignore-time --delete -v ' + public_dir + ' ' + config.root + '; bye',
|
||||
'-u',
|
||||
config.user,
|
||||
config.host
|
||||
@@ -47,4 +49,4 @@ hexo.extend.deployer.register('ftp', function (args, callback) {
|
||||
run('lftp', args, function (code) {
|
||||
callback();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user