Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem during grunt-uglify task #85

Open
alanmarcos opened this issue Mar 13, 2014 · 6 comments
Open

Problem during grunt-uglify task #85

alanmarcos opened this issue Mar 13, 2014 · 6 comments

Comments

@alanmarcos
Copy link

Whenever i try to concatenate selectivizr with some other files, the selectivizr itself doesn't get compiled at all. It just come out blank.

Is there anyone having the same issue?

@jbruni
Copy link

jbruni commented Mar 19, 2014

Consider this code at the beginning of selectivzr:

if (/*@cc_on!@*/true) return;

Uglify reads it as if (true) return; - so it triggers the corresponding minification, excluding the remaining of the file. Try removing this line and you will see it "compiled". (Just to verify. This is not a solution.)

More: http://stackoverflow.com/questions/17744175/using-uglify-grunt-task-messes-up-selectivizr

@jpdevries
Copy link

This is good to know, curious why would you concatenate selectivizr with other files? Are the files being bundled polyfills for old browsers also?—
Sent from Mailbox for iPhone

On Wed, Mar 19, 2014 at 4:35 PM, J Bruni [email protected] wrote:

Consider this code at the beginning of selectivzr:
if (/@cc_on!@/true) return;
Uglify reads it as if (true) return; - so it triggers the corresponding minification, excluding the remaining of the file. Try removing this line and you will see it "compiled". (Just to verify. This is not a solution.)

More: http://stackoverflow.com/questions/17744175/using-uglify-grunt-task-messes-up-selectivizr

Reply to this email directly or view it on GitHub:
#85 (comment)

@jpdevries
Copy link

I think I just answered my own question. I've bundled selectivizr with nwmatcher before to get all the selectors. —
Sent from Mailbox for iPhone

On Wed, Mar 19, 2014 at 4:35 PM, J Bruni [email protected] wrote:

Consider this code at the beginning of selectivzr:
if (/@cc_on!@/true) return;
Uglify reads it as if (true) return; - so it triggers the corresponding minification, excluding the remaining of the file. Try removing this line and you will see it "compiled". (Just to verify. This is not a solution.)

More: http://stackoverflow.com/questions/17744175/using-uglify-grunt-task-messes-up-selectivizr

Reply to this email directly or view it on GitHub:
#85 (comment)

@ellioseven
Copy link

I find that 1.0.3 doesn't have this problem with grunt-contib-uglify.

The only problem is that I only get 1.0.2 with bower?

@ellioseven
Copy link

Just a side note, you will need:

preserveComments: 'some'

to get selectivizr 1.0.3 to compile properly.

@silvenon
Copy link

Any idea why this is happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants