1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2025-06-30 22:16:39 -04:00

Use Object destructuring.

This commit is contained in:
XhmikosR
2018-11-28 23:51:49 +02:00
committed by Shun Sato
parent fe5d9a0a52
commit d5e5e6113f
3 changed files with 6 additions and 5 deletions

5
cli.js
View File

@ -2,9 +2,10 @@
'use strict';
const spawn = require('child_process').spawn;
const { spawn } = require('child_process');
const hugo = require('.');
const input = process.argv.slice(2);
spawn(hugo, input, {stdio: 'inherit'})
spawn(hugo, input, { stdio: 'inherit' })
.on('exit', process.exit);

View File

@ -5,7 +5,7 @@ const BinWrapper = require('bin-wrapper');
const pkgConf = require('pkg-conf');
const pkg = require('../package');
const hugoVersion = pkg.hugoVersion;
const { hugoVersion } = pkg;
const baseUrl = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/`;
const binNameMap = {

View File

@ -26,6 +26,6 @@ bin(getProjectRoot()).run(['version'])
.then(() => {
signale.success('Hugo binary installed successfully!');
})
.catch(err => {
signale.fatal(`${err.message}\nHugo binary installation failed!`);
.catch(error => {
signale.fatal(`${error.message}\nHugo binary installation failed!`);
});