taskr: target structure is not correct when passing `file` as param to task
i hope i am not doing something wrong,
this issue #200 was fixed and works perfectly now, but when using fly-babel if you dont pass file
as param to the task function babel will transpile all files in path.
As i understood from the doc watch file
should be passed, and it works great now babel only transpile the passed file, but the same problem in the referenced issue above occurs again.
here is my code
const paths = {
scripts: ['./src/**/*.js']
}
export default async function () {
await this.watch(paths.scripts, `babel`);
}
export async function babel(file) {
await this.source(file || paths.scripts)
.babel({
presets: [["es2015", {"modules": false}], "stage-1", "stage-3"],
plugins: ["transform-es2015-modules-commonjs",
['transform-runtime', {
"polyfill": false,
"regenerator": true
}]
],
sourceMaps: true
})
.target(`./dist`);
}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (11 by maintainers)
Commits related to this issue
- normalize glob strings; resolves #216 — committed to lukeed/taskr by lukeed 8 years ago
- construct `file.base` consistently (#217) * use relative pathing for test fixtures * modify file.base truncation; keep if unseen OR if matches first wildcard * rewrite Array.findIndex & String.... — committed to lukeed/taskr by lukeed 8 years ago
- construct `file.base` consistently (#217) * use relative pathing for test fixtures * modify file.base truncation; keep if unseen OR if matches first wildcard * rewrite Array.findIndex & String.... — committed to lukeed/taskr by lukeed 8 years ago
- construct `file.base` consistently (#217) * use relative pathing for test fixtures * modify file.base truncation; keep if unseen OR if matches first wildcard * rewrite Array.findIndex & String.... — committed to lukeed/taskr by lukeed 8 years ago
Nope, looks fine. I’ll hijack a machine.
@lukeed it works like charm and now browser-sync and compiling happen in 200 ms instead of 1.2 seconds!
i will continue testing to see if there are other edge cases.
thank you very much.
Releasing as
1.4.1
. Give it a spin && let me know!I tested on windows with 5-level nesting, worked like it’s supposed to. Thanks for reporting 😃
@lukeed thaks man did not mean to rush, sorry if it sounded like that.