Git Product home page Git Product logo

Comments (13)

NikolaRHristov avatar NikolaRHristov commented on June 9, 2024 3

But expect it in 1.2.0

from compress.

NikolaRHristov avatar NikolaRHristov commented on June 9, 2024 1

@RichardLindhout I have thought about that! 😁 But that would require some harder thinking.

from compress.

NikolaRHristov avatar NikolaRHristov commented on June 9, 2024 1

Yeah, no problem! I've been thinking about using the internal git cache of a repository and simply outputting a folder with already processed files. Then just calling that folder to see if something's cached or not. The simplest of things.

sequenceDiagram
    participant User
    participant AstroCompress
    participant Cache
    participant FilesPipe
    participant Git

    User->>AstroCompress: Input Files
    loop Check Cache
        AstroCompress->>Cache: Check if cached
        Cache-->>AstroCompress: Cache status
    end
    alt Cache Found
        AstroCompress->>Cache: Retrieve from Cache
        Cache-->>AstroCompress: Cached Files
    else Cache Not Found
        AstroCompress->>FilesPipe: Process Files
        FilesPipe-->>AstroCompress: Processed Files
        AstroCompress->>Cache: Store in Cache
        Cache-->>AstroCompress: Cache Stored
        AstroCompress->>Git: Commit Processed Files
        Git-->>AstroCompress: Commit ID
    end
    Git->>User: Commit ID
    alt Processed Files Changed
        AstroCompress->>Cache: Replace Cached Files
        Cache-->>AstroCompress: Replacement Done
    end
    AstroCompress->>User: Output Files

That way you can stage that folder in git and have those files persisted, so every time AstroCompress is executed on the CI or somewhere it can have something to work with.

from compress.

azat-io avatar azat-io commented on June 9, 2024 1

Thank you, I love your package.
Really looking forward to the caching feature.

from compress.

NikolaRHristov avatar NikolaRHristov commented on June 9, 2024

I noticed the slow build times on https://github.com/nikolaxhristov/astro.build.compress.critters, as well and also some errors ough

from compress.

RichardLindhout avatar RichardLindhout commented on June 9, 2024

@NikolaRHristov does this work now, would be really cool!

from compress.

NikolaRHristov avatar NikolaRHristov commented on June 9, 2024

Hey @RichardLindhout, still not I'm afraid 😅 That's why astro-compress is still version 1.1.x 🤣

from compress.

NikolaRHristov avatar NikolaRHristov commented on June 9, 2024

I have some time over the weekend so I'll give it a crack.

from compress.

RichardLindhout avatar RichardLindhout commented on June 9, 2024

Wow that would be so great!!

from compress.

lyleschemmerling avatar lyleschemmerling commented on June 9, 2024

Hey @NikolaRHristov Thanks again for opening that PR against FusionAuth!

I know you are trying to pull back from this project, but did you have thoughts on how this would work? I might hack on this and make a PR if you haven't gotten very far.

from compress.

NikolaRHristov avatar NikolaRHristov commented on June 9, 2024

This would ideally be implemented in FilesPipe - https://github.com/NikolaRHristov/FilesPipe

from compress.

NikolaRHristov avatar NikolaRHristov commented on June 9, 2024

This is very well still in its ideation stage and PRs are welcome.

from compress.

NikolaRHristov avatar NikolaRHristov commented on June 9, 2024

Thank you, I love your package. Really looking forward to the caching feature.

🙏🏻 Yeah, same, this is a hard feature.

from compress.

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.