Comments (14)
JSMin is written in C. You could have easily distinguished this project from your Python crap.
If it is any comfort to you, you are not the first to commit this blunder.
from jsmin.
I didn't realize that #23 was a dupe of this till now, but I have more insight as to what the problem is, and a workaround there, if you are interested.
from jsmin.
I'm seeing the same problem, just came looking for this here.
d3.select(`.tablerow-${year} .date`).text(`${formatDate(d.date)}/${year}`);
d3.select(`.tablerow-${year} .count`).text(d.count);
is getting translated to
d3.select(`.tablerow-${year}.date`).text(`${formatDate(d.date)}/${year}`);d3.select(`.tablerow-${year}.count`).text(d.count);
Note the spaces missing before .date
and .count
in the two statements
from jsmin.
I bumped into this again. Is this repo abandoned?
If anyone finds this I decided to use rjsmin, which comes included with webassets (see https://webassets.readthedocs.io/en/latest/builtin_filters.html#webassets.filter.rjsmin.RJSMin). rjsmin does not have this issue.
from jsmin.
from jsmin.
Maybe the encode (code page) you are using?
Not sure what this means. My compressed file (on my windows development system) is coming up as UTF-8 from jsmin (and rjsmin, which compresses properly). I see the same issue in my production system which is CentOS 7. I can check the encoding there if that seems important.
I'm using jsmin-3.0.1. I'm running it via flask-assets 2.0 using webassets 2.0.
What else could be affecting this behavior?
from jsmin.
from jsmin.
I'll see if I can come up with something -- may be a couple of days. Thanks.
If "not small" is ok, you can use this one.
e.g., https://github.com/louking/loutilities/blob/a1a2789c815b077fb08fe58a23d0db3a0337090f/loutilities/tables-assets/static/charts.js#L392 is being compressed as d3.selectAll(`${that.options.containerselect}.focuslabel-${label}`).style("display",null);
from jsmin.
I edited the previous comment and want to make sure you saw my edits. Please let me know if you need me to come up with a smaller example.
from jsmin.
It turns out it was pretty easy to recreate in a small example. In my environment (flask-assets 2.0; webassets 2.0; jsmin 3.0.1), test.js gets compiled by jsmin into testjs.js, in the enclosed zip file.
asset_bundles = {
'test_js': Bundle(
'test.js',
filters='jsmin',
output='gen/testjs.js',
),
...
from jsmin.
I edited the previous comment and want to make sure you saw my edits. Please let me know if you need me to come up with a smaller example.
Using your file I got:
d3.selectAll(${that.options.containerselect} .focuslabel-${label}
).style("display",null);
Are you sure you are using the latest version?
from jsmin.
I installed jsmin 3.0.1 from pypi. At least that is what pip freeze tells me. Is there something later than that?
From my requirements.txt file:
jsmin==3.0.1
from jsmin.
I installed this as a pip upgrade, I think from jsmin 2.2.2 (not sure because I didn't capture the original install in the log I keep -- grr). Is it possible that the old executable is being used somehow in that use case? Just grasping at straws here...
from jsmin.
Many apologies. Looking at pypi I see now that the correct repo is https://github.com/tikitu/jsmin/
I am not sure how I found your repo initially.
Sorry for any wasted effort.
from jsmin.
Related Issues (18)
- Unterminated Regular Expression Error except when comment on next line HOT 4
- Unrecognized Regex Literals HOT 1
- Feedback on License comments HOT 2
- c++ streambuf implementation HOT 1
- Any way to optimize Firefox JS files? HOT 3
- Regular expression literal can have its whitespace removed HOT 5
- Broken link on documentation site HOT 2
- Jsmin doesn't treat backtick strings as strings HOT 6
- use_2to3 is invalid HOT 2
- Can we tag a release? HOT 1
- Over eager removal of whitespace HOT 4
- Preserve important comments e.g. copyright/ license information HOT 1
- JSMin gives error when parsing a specific string HOT 2
- Linefeeds in Javascript Strings HOT 1
- Licensing issues HOT 5
- Regex: / /g seems to be replaced by //g HOT 1
- Unary Plus operator (+) to convert boolean to number, preceded by addition operator causes JS syntax error HOT 7
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 jsmin.