You've already forked hugo-extended
mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-09-13 05:15:31 -04:00
Use Object destructuring.
This commit is contained in:
5
cli.js
5
cli.js
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const spawn = require('child_process').spawn;
|
const { spawn } = require('child_process');
|
||||||
const hugo = require('.');
|
const hugo = require('.');
|
||||||
|
|
||||||
const input = process.argv.slice(2);
|
const input = process.argv.slice(2);
|
||||||
|
|
||||||
spawn(hugo, input, {stdio: 'inherit'})
|
spawn(hugo, input, { stdio: 'inherit' })
|
||||||
.on('exit', process.exit);
|
.on('exit', process.exit);
|
||||||
|
@@ -5,7 +5,7 @@ const BinWrapper = require('bin-wrapper');
|
|||||||
const pkgConf = require('pkg-conf');
|
const pkgConf = require('pkg-conf');
|
||||||
const pkg = require('../package');
|
const pkg = require('../package');
|
||||||
|
|
||||||
const hugoVersion = pkg.hugoVersion;
|
const { hugoVersion } = pkg;
|
||||||
const baseUrl = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/`;
|
const baseUrl = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/`;
|
||||||
|
|
||||||
const binNameMap = {
|
const binNameMap = {
|
||||||
|
@@ -26,6 +26,6 @@ bin(getProjectRoot()).run(['version'])
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
signale.success('Hugo binary installed successfully!');
|
signale.success('Hugo binary installed successfully!');
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(error => {
|
||||||
signale.fatal(`${err.message}\nHugo binary installation failed!`);
|
signale.fatal(`${error.message}\nHugo binary installation failed!`);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user