UNPKG
tw-runner
Version:
latest (1.0.18)
1.0.18
1.0.17
1.0.16
1.0.15
1.0.14
1.0.13
1.0.11
1.0.10
Run and manage Tower Website projects with this utility.
tw-runner
/
bin
/
lib
/
utils
/
hugo-build.js
12 lines
(11 loc)
•
303 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
import
{ execSync }
from
'child_process'
;
export
default
async
function
buildHUGOProject
(
) {
try
{
execSync
(
`npm run build`
, {
stdio
:
'inherit'
,
timeout
:
30000
// 30 seconds timeout
}); }
catch
(error) {
console
.
error
(
`Failed to build HUGO project:`
, error.
message
); } }