Giter VIP home page Giter VIP logo

Comments (7)

code-forger avatar code-forger commented on June 2, 2024 2

This is actually an issue in Bash.
using $ minify hello.js > hello.js
Bash will first execute the file redirect, prepare hello.js for writing by wiping it. Then it will execute the left hand side, allowing minify to read the now empty hello.js

Short of adding a flag called something like --overwrite-source that minifies, then writes the files back over themselves this project cannot support this.

@coderaiser What are your thoughts? would you be interested in a PR to that effect?

from minify.

coderaiser avatar coderaiser commented on June 2, 2024

Why don't use:

npx minify static/index.html > static/.index.html && mv static/.index.html static/index.html

from minify.

rschristian avatar rschristian commented on June 2, 2024

I do in fact use that.

Perhaps "remove the original" is a bit poorly worded when I meant "overwrite", but I digress.

Feature would certainly be nice regardless, certainly there are work arounds in the mean time so low priority.

from minify.

coderaiser avatar coderaiser commented on June 2, 2024

That's a good idea for a pull request :).

from minify.

rschristian avatar rschristian commented on June 2, 2024

I did end up getting something together, not sure what ended up happening to it. If I find some time I'll do it again, but as I'm not using minify (not even sure what I was using it for in the first place) it's not a high priority for me right now. Certainly doesn't mean it should be any sort of priority (or even on the radar) for you either, don't get me wrong.

from minify.

coderaiser avatar coderaiser commented on June 2, 2024

@code-forger yes, that's amazing idea for a PR :).

from minify.

coderaiser avatar coderaiser commented on June 2, 2024

Closed due to a long time of inactivity 🏝

from minify.

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.