Giter VIP home page Giter VIP logo

Comments (7)

 avatar commented on June 29, 2024

Good question. I will have an answer as soon as I release 0.2.0

Definitely no wrappers or painful abstractions.

No problem with using require, but I haven't tested using import in a Flyfile. I like this.

from taskr.

 avatar commented on June 29, 2024

@girvo Alright, so [email protected] is out.

Now we have support for async tasks in plugins.

For example a plugin for browserify could look like this:

function myFilter (data, options, cb) {
  // do browserify stuff here
}

this.filter("myPlugin", (source, options) => {
  return this.defer(myFilter).call(this, source, options)
})

I haven't actually done this as I just bumped this version and I still have some TODOs before I can tackle a browserify plugin.

But with async support this should be possible regardless of how browserify works.

Now, Fly does not use streams so different from gulp in which a browserify plugin would be discouraged, it would be ok in Fly, since it would just be a couple of LOC and we want to integrate nicely into Fly promise sequence.

from taskr.

 avatar commented on June 29, 2024

@girvo Now we have a work around. It's not perfect as it ends up reading IO twice due to Fly's inability to handle streams at the moment, but this should change when channels land in Fly somewhere around 0.4.0 or 0.5.0

from taskr.

 avatar commented on June 29, 2024

@MadcapJake Comments?

from taskr.

MadcapJake avatar MadcapJake commented on June 29, 2024

With the latest fly-browserify, we now have a working implementation. I for one, am happy with where it's at even with the extra IO because at least it works! 😅

Also, with regards to imports, I am currently using earlify with it and it works just fine! You can set all the options that browserify normally accepts too.

As an example, right now I'm working on a gh-pages website written entirely in Earl Grey and I'm using fly to build it. It's really basic right now but it works and I can jump in and uncomment uglify when I'm ready for production (Which is kind of a neat way to think about it as I can jump in to my Flyfile and treat each filter as switches to be turned on and off). Check it out here.

Many thanks to @bucaran for finalizing a proper browserify solution too! 👍

from taskr.

MadcapJake avatar MadcapJake commented on June 29, 2024

This issue could be closed. @girvo has contacted me on fly-browserify's repo, we were stuck at a bug but I've written a fix and I'm just waiting to hear back on whether that has fixed it.

from taskr.

 avatar commented on June 29, 2024

@MadcapJake Thanks!

from taskr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.