Closed devmondo closed 7 years ago
Hi @devmondo. Unfortunately with 2.0
right around the corner, I won't be supporting 1.4.x
anymore.
Fly 2.0
is a massive improvement in many ways. It's only in beta
still because I'm upgrading "essential" plugins to the 2.0
syntax.
Hope it's not too much of a bother in the interim.
@lukeed thank you very much for the always prompt support :)
i am waiting eagerly for 2.0
hope it is coming soon !
@devmondo Let me know a list of plugins you're actively using (besides babel) and I'll let you know when those have been converted.
@lukeed thanks man, nothing special really
besides above i dont have anything special and everything is working fine except this slow time and windows path issue here #216
@devmondo Ah, then you can actually go ahead and start using fly@beta; the only real difference is that .concat
got moved to its own plugin.
@devmondo Oh, and passing files to tasks changed a bit too. (There will be an upgrade guide -- haven't gotten to it yet).
exports.default = function * () {
yield this.watch(globs, ['task1', 'task2']); // <= will be ran serially
};
exports.task1 = function * (o) {
// o.val: any returned (or initial) value
// o.src: a single FILE PATH, via .watch() ****
yield this.source(o.src || 'src/foo.bar')
.babel().target('dist');
}
@lukeed
i uninstalled fly
and fly-babel
and installed fly@beta
and fly-babel
again and here is my code below
const paths = {
clientScripts: [`src/client/**/*.js`],
serverScripts: [`src/server/**/*.js`],
html: `src/client/**/*.html`
}
export default async function () {
isWatch = true;
isProd = false;
await this.watch(paths.clientScripts, [`clientJs`]);
await this.watch(paths.serverScripts, [`serverJs`]);
}
export async function clientJs(o) {
await this.source(o.src || o.val)
.babel(babelOptions)
.target(target);
}
maybe i am doing something wrong, but i get this error
TypeError: this.filter is not a function
- at Fly.module.exports (C:\projects\test\node_modules\fly-babel\index.js 9:15)
@devmondo fly-babel
currently written in old manner (not for v2
). Basically API
for plugins changed a little bit with v2
. Luke will fix it soon I think.
@hzlmn thanks for explanation man
@devmondo My bad, Luke has already changed it here
but seems like not released. If you want to try it right now, you can just install module from git
@lukeed @hzlmn thank you
installing fly-babel
through get made things work but only using the generators
yield
syntax, using async/await
syntax gives an error task is not a function
.
and i traced down the time accumulation issue, it is webstorm, i guess there is some kind of conflict between it and the filewatcher used in fly
?
@devmondo Could you give a stacktrace, or better a screenshot of this error ?
@hzlmn sure
stack:
- TypeError: task is not a function
- at Fly.<anonymous> (C:\projects\test\node_modules\fly\lib\api\start.js 42:16)
- at undefined.next (native)
- at undefined.tryCatcher (C:\projects\test\node_modules\fly\node_modules\bluebird\js\release\util.js 16:23)
- at PromiseSpawn._promiseFulfilled (C:\projects\test\node_modules\fly\node_modules\bluebird\js\release\generators.js 97:49)
- at Fly.start (C:\projects\test\node_modules\fly\node_modules\bluebird\js\release\generators.js 201:15)
- at Fly.<anonymous> (C:\projects\test\node_modules\fly\lib\boot.js 6:12)
- at C:\projects\test\node_modules\fly\lib\api\serial.js 13:22
- at undefined.next (native)
- at undefined.tryCatcher (C:\projects\test\node_modules\fly\node_modules\bluebird\js\release\util.js 16:23)
- at PromiseSpawn._promiseFulfilled (C:\projects\test\node_modules\fly\node_modules\bluebird\js\release\generators.js 97:49)
- at C:\projects\test\node_modules\fly\node_modules\bluebird\js\release\generators.js 201:15
- at tryCatcher (C:\projects\test\node_modules\fly\node_modules\bluebird\js\release\util.js 16:23)
- at Object.gotValue (C:\projects\test\node_modules\fly\node_modules\bluebird\js\release\reduce.js 157:18)
- at Object.gotAccum (C:\projects\test\node_modules\fly\node_modules\bluebird\js\release\reduce.js 144:25)
- at Object.tryCatcher (C:\projects\test\node_modules\fly\node_modules\bluebird\js\release\util.js 16:23)
- at Promise._settlePromiseFromHandler (C:\projects\test\node_modules\fly\node_modules\bluebird\js\release\promise.js 510:31)
message: task is not a function
export default async function () {
await this.watch(paths.clientScripts, ['clientJs']);
};
export async function clientJs(o) {
await this.source(o.src || paths.clientScripts)
.babel(babelOptions)
.target('dist/client/');
}
@devmondo interesting... will look on this at home.
@devmondo @hzlmn Hi guys, sorry I've been walking around the city today (on holiday).
Yeah, I guess I forgot to publish fly-babel
. I'll do that now.
And I haven't tackled fly-esnext
yet. You can't make async/await
interchangeable with gen/yield
anymore -- it truly is a "versus" situation, so I'll add a little elbow grease to get that tied together.
I should've mentioned that... my bad. Was rushing out the door.
Here's a related chokidar+webstorm issue.
@lukeed thanks a lot for the update as mentioned here https://github.com/paulmillr/chokidar/issues/445#issuecomment-193290880 can we pass option to chokdir ?
and have a great weekend guys :)
@devmondo Can you try setting it to true
locally & let me know how it goes? You're running Win and Webstorm, both of which I can't use right now.
A la chokidar
repo:
CHOKIDAR_USEPOLLING=1 npm run fly
@lukeed holy god!!!! it went from 1 second to 200 - 250 ms stable!!!!!! and i made sure to modify file and save it multiple times aggressively. so yeah your suggestion works!
@devmondo hahaha, good!... I'll look into it more. Not sure (yet) if usePolling
should always be true
on Windows, or if it's just your Webstorm + Windows environment.
hi,
with this below time keep increasing with each compile step so it starts with 200 ms and keep going up to 1 second, 2 seconds,etc... i checked to see if only one files is passed and indeed it is