Skip to content
Myr

nested-transform.js

This file

Path

test/fixtures/nested-transform.js

13 lines · 463 bytes · JavaScript

Last changed by

Add support for `buffer: false` to `execaSync()` (#953)ehmickybefore adoptiond0052ac

History of this file

Take it

Print output with `verbose` option (#884)ehmickybefore adoption6fda30f

lines 1–2why, one step back
1#!/usr/bin/env node
2import process from 'node:process';

Add support for `buffer: false` to `execaSync()` (#953)ehmickybefore adoptiond0052ac

line 3why, one step back
3import {execa, execaSync} from '../../index.js';

Add support for `std*: duplex` option (#937)ehmickybefore adoption6ca44fb

line 4why, one step back
4import {generatorsMap} from '../helpers/map.js';

Print output with `verbose` option (#884)ehmickybefore adoption6fda30f

line 5why, one step back
5

Add support for `std*: duplex` option (#937)ehmickybefore adoption6ca44fb

line 6why, one step back
6const [optionsString, file, ...args] = process.argv.slice(2);

Add support for `buffer: false` to `execaSync()` (#953)ehmickybefore adoptiond0052ac

lines 7–13why, one step back
7const {type, isSync, ...options} = JSON.parse(optionsString);
8const newOptions = {stdout: generatorsMap[type].uppercase(), ...options};9if (isSync === 'true') {10 execaSync(file, args, newOptions);11} else {12 await execa(file, args, newOptions);13}