runok
Version:
NPM scripts on steroids! Replace your scripts with pure JS
22 lines (21 loc) • 452 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const exec_1 = require("./exec");
/**
* Executes npm script
*
* ```js
* await npmRun('deploy');
* ```
*
* @param command
* @param config
*/
async function npmRun(command, config) {
return exec_1.default(command, (baseCfg) => {
baseCfg.TASK = 'npmRun';
baseCfg.prefix('npm run');
baseCfg.apply(config);
});
}
exports.default = npmRun;