Comments (7)
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.
Why don't use:
npx minify static/index.html > static/.index.html && mv static/.index.html static/index.html
from minify.
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.
That's a good idea for a pull request :).
from minify.
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.
@code-forger yes, that's amazing idea for a PR :).
from minify.
Closed due to a long time of inactivity 🏝
from minify.
Related Issues (20)
- Comma missing HOT 1
- Benchmarks? HOT 2
- Minify removes top-level js functions because it's "unused" HOT 4
- Class name minification should not be done by default. HOT 2
- Invalid minification of '+' unary prefix operator HOT 2
- Invalid minification of computed method names HOT 4
- Invalid minification of generators HOT 11
- Invalid yield statement minification HOT 1
- Object.keys turned into "keys" HOT 3
- Can you also support mifinfy a markdown .md file? HOT 4
- Wrong execution order HOT 4
- Parentheses around increment operator are discarded HOT 2
- unable to compress js files containing Chinese HOT 3
- Bug: transform code to unsafe code HOT 20
- SyntaxError when using v10.5.2 on node v14.16.1 HOT 11
- Minification error `[email protected]` doesn't respect double quotes and convert it all to single quotes HOT 6
- Incorrect javascript produced for nested single line if..else statements. v10.3.0-v11.0.1 HOT 1
- Order of operations not preserved when using classes or switch statement HOT 3
- Incorrect code generated using template literals HOT 2
- BUG: After release v11.1.1, all HTML files are exported completelly in blank HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minify.