audinue / rollup-plugin-execute

Execute shell command(s) sequentially when the bundle is generated.
25 stars 6 forks source link

Block until command returns #7

Closed pjebs closed 5 years ago

pjebs commented 5 years ago

execute('gopherjs build ./app/cron_screen -m -o ./app/cron_screen_temp.js'),

It would be good if this plugin blocks until the command it is executing returns with an error code etc.

Right now, it seems to run the command and go to next command.

pjebs commented 5 years ago
import * as childx from 'child_process'
    childx.execSync(path);
pjebs commented 5 years ago
child_process.spawnSync(command[, args][, options])

instead of spawn() which is what this library uses.

Or perhaps make it an option for backwards compatibility.

enure commented 5 years ago

I agree, I just discovered this is the cause of a bug where that's built with a grunt plugin is sometimes not being included in my Rollup-based build.

enure commented 5 years ago

I believe this is resolved by https://github.com/audinue/rollup-plugin-execute/pull/8.

Thanks for the fix!