Code Monkey home page Code Monkey logo

Comments (6)

Shazwazza avatar Shazwazza commented on September 17, 2024

Yup it should be, i just didn't get around to a few of those features yet (oops forgot!): https://github.com/Shazwazza/Smidge/blob/master/src/Smidge/Models/IWebFile.cs#L12

from smidge.

Shazwazza avatar Shazwazza commented on September 17, 2024

I'll also allow for programmatic ordering before they are processed

from smidge.

Shazwazza avatar Shazwazza commented on September 17, 2024

Hi, I've added this functionality in this rev: c06d98e

So now you can supply an Order property to any IWebFile, the default is zero and it cannot be less than zero. If you assign an Order then it will be taken into account before the collection of files is processed.

For a more dynamic approach when using bundles, you can assign a callback. So you bundle definition could look something like:

bundles.Create("test-bundle-1",
    new JavaScriptFile("Js/Folder*js"),
    new JavaScriptFile("~/Js/Bundle1/a2.js"))
    .OnOrdering(collection =>
    {
        //return some custom ordering
        return collection.OrderBy(x => x.FilePath);
    });

Let me know if that suits your needs and i'll publish a new version and update the docs too.

from smidge.

Shazwazza avatar Shazwazza commented on September 17, 2024

Hi, just wanted to check if the above solves your issue so I can close this one (and release a new version)

from smidge.

mrvelic avatar mrvelic commented on September 17, 2024

Hi,

Sorry about that! I remember reading through it and discussing with co-workers about it but I totally forgot to actually write up a reply.
As far as I can tell it looks like it would do the job :) We are a bit off actually migrating the software to a new bundler (it's for when we switch to "core").

Feel free to release if you're happy; When we actually get a chance to do some real proper testing we'll let you know if anything comes up.

Thanks again!

from smidge.

Shazwazza avatar Shazwazza commented on September 17, 2024

Ok great, I'll close the issue for now and ship a new version. Thanks for the feedback!

from smidge.

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.