Closed lukeed closed 7 years ago
@jbucaran @hzlmn (others?) Thoughts? About to tackle this
@lukeed 👍 It would be nice to provide as simple API as we can,
we can extract useful plugins like fly-rename
or fly-concat
into something similar to presets in babel
,
that will regain core funcs of 1.*
releases
@lukeed Also, I would like to start discussion of plugin's API changes as part of 2.*
release.
Current API
, as we can see, does not alow us to handle exceptions, in a way it should be (as we bind each plugin directly to fly
instance)
What do you think?
I'm onboard with this, as I've already removed concat
from my build so far.
What do you suggest? And what exceptions, specifically, are you talking about?
So far, I've dramatically improved the reliability of await
ing tasks & how those tasks' errors are thrown in both parallel
and serial
modes. This was a big motivation for rewriting a 2.0
.
In essence, this gives any plugin the ability to throw new Error('msg')
and it'll interrupt a serial
chain with the appropriate logging & just log during a parallel
sequence.
Please see my comments here and here.
I will also update this comment with a link to fly-concat
once it's available.
Updated: fly-concat
(This would be part of the 2.0 release)
Continuing with my weird metaphor in #207 (comment),
fly.concat
is really the only core API that doesn't fit the rest of the class.All other methods are "A ➡️ B" handlers, relying on external functions in between, while
fly.concat
is the only method that manipulates files during the "A ➡️ B" process.Doing this would require exposing an entryway that hooks in before the
target()
resolution.This would also also be a fantastic time to consider opening the door to Streaming (like Gulp)?
Pro
sourcemap
capabilitiesPathObject
properties are accessible via plugins'options.file
Con
1.x
core1.x
user adjustment