lukeed / taskr

A fast, concurrency-focused task automation tool.
MIT License
2.53k stars 74 forks source link

Save context after `fly.target` #231

Closed hzlmn closed 7 years ago

hzlmn commented 7 years ago

Hi, could we save context of file object after finally written it withfly.target ? For examples I have task scss and want to compile it to css and write to file.

yield this
  .source('./src/**.scss')
  .sass()
  .target('./build')

but when I need to make one extra step after target - data param is lost Example:

yield this
   .source(files)
   .sass()
   .target('./build')
   .minify()  // here i want to minify compiled content 
   .concat('test.min.css')  // concat to single file
   .target('./build')   // and then write back to build dir
hzlmn commented 7 years ago

Right now for same task I use this.$.write and internal this._.files array, that seems more like a hack.

lukeed commented 7 years ago

This is a simple fix. 👍 I had it in mind at the beginning but forgot to ensure it was achievable.