loop
loop copied to clipboard
Add dynamic commands using a function in task definition
Now you can define a run task like
let copyFiles = run({
name: 'copy files',
sh: (changedFiles) => `mkdir -p dist; cp ${changedFiles.join(' ')} dist/`,
watch: ['src/**']
})
this can be pretty convenient to process only files that actually changed