mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-16 23:33:38 -05:00
14 lines
502 B
JavaScript
14 lines
502 B
JavaScript
const chalk = require('chalk')
|
|
const checkpoint = require('./checkpoint')
|
|
const figures = require('figures')
|
|
const runExec = require('./run-exec')
|
|
|
|
module.exports = function (args, hookName) {
|
|
const scripts = args.scripts
|
|
if (!scripts || !scripts[hookName]) return Promise.resolve()
|
|
var command = scripts[hookName]
|
|
checkpoint(args, 'Running lifecycle script "%s"', [hookName])
|
|
checkpoint(args, '- execute command: "%s"', [command], chalk.blue(figures.info))
|
|
return runExec(args, command)
|
|
}
|