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

grunt task doesn't work after new version of purifycss was released #21

Open
mchayka opened this issue Feb 15, 2016 · 12 comments
Open

grunt task doesn't work after new version of purifycss was released #21

mchayka opened this issue Feb 15, 2016 · 12 comments

Comments

@mchayka
Copy link

mchayka commented Feb 15, 2016

After updating npm packages, my grunt purifycss task stopped working with error message

Warning: Maximum call stack size exceeded Use --force to continue.

It worked well before updating. One difference is version of purifycss dependency.

@kennyt
Copy link
Member

kennyt commented Feb 15, 2016

Thanks for reporting this. Can I see the way you use the task?

@kennyt
Copy link
Member

kennyt commented Feb 15, 2016

Can you force it to use v1.1.1 of PurifyCSS and let me know if that works? That'll help me debug

@kennyt kennyt closed this as completed Feb 15, 2016
@kennyt kennyt reopened this Feb 15, 2016
@mchayka
Copy link
Author

mchayka commented Feb 16, 2016

My grunt task

purifycss: {
    options: {},
    target: {
        src: ['build/*.html', 'build/javascript/*.js'],
        css: ['build/stylesheets/*.css'],
        dest: 'build/stylesheets/style.css'
    }
},

how I use it

grunt.registerTask('styles', 'Build styles only', ['clean:stylesheets', 'sass:build', 'autoprefixer', 'purifycss', 'cssmin' ]);

It works well with purify-css version 1.0.17, but throws the error when version is 1.1.6. Please advice me how to force grunt-purifycss to use v1.1.1 of PurifyCSS
Thanks

@kennyt
Copy link
Member

kennyt commented Feb 16, 2016

Can you show me the log of the list of files Source files / Style files that gets logged out when you run the task?

You can force it to use v1.1.1 by deleting the purify-css folder inside at /node_modules/grunt-purifycss/node_modules/purify-css. Then do a npm install [email protected] and then run the task

Before you do that, be sure to get me the list of files that get logged out :)

@mchayka
Copy link
Author

mchayka commented Feb 17, 2016

For both v1.1.6 and v1.1.1 the log is the same:

Running "purifycss:target" (purifycss) task
Source Files:  [ 'build/account-dashboard-black.html',
  'build/account-dashboard-gold.html',
  'build/account-dashboard-platinum.html',
  'build/account-dashboard-red.html',
  'build/account-dashboard-request-card-overlay.html',
  'build/account-join-discovery.html',
  'build/account-le.html',
  'build/account-my-claim-details.html',
  'build/account-my-preferences.html',
  'build/account-profile-password.html',
  'build/account-registration-confirmation.html',
  'build/account-reservatioin.html',
  'build/account-reservatioins-and-stay-cancel-overay.html',
  'build/account-reservatioins-and-stay.html',
  'build/account-stay-claims.html',
  'build/destinations-list.html',
  'build/destinations-map.html',
  'build/forgot-password.html',
  'build/generic-about-gha.html',
  'build/generic-contact-us-thanks.html',
  'build/generic-contact-us.html',
  'build/generic-press.html' ]
Source Files:  [ 'build/javascript/booking.js',
  'build/javascript/file-input.js',
  'build/javascript/form-reset.js',
  'build/javascript/google.maps.js',
  'build/javascript/infobubble.js' ]
Source Files:  [ 'build/javascript/vendor/jquery-ui.min.js',
  'build/javascript/vendor/jquery.min.js',
  'build/javascript/vendor/jquery.mobile.min.js',
  'build/javascript/vendor/modernizr.min.js',
  'build/javascript/vendor/respond.min.js' ]
Style Files:  [ 'build/stylesheets/style.css' ]
Warning: Maximum call stack size exceeded Use --force to continue.

Aborted due to warnings.

But works great with 1.0.17 the difference in the log is a footer instead of the error

##################################
Before purify, CSS was 431118 chars long.
After purify, CSS is 264787 chars long. (1.6 times smaller)
##################################
This function took:  2521 ms
File "build/stylesheets/style.css" created.

Thanks for the tip it's useful.

@kennyt
Copy link
Member

kennyt commented Feb 18, 2016

Do you think you can email me your build/stylesheets/style.css? (before it gets purified) [email protected] I'd like to figure out this bug

@mchayka
Copy link
Author

mchayka commented Feb 22, 2016

Done

@mchayka
Copy link
Author

mchayka commented Mar 10, 2016

@kennyt Did you find a solution for the issue?

@maKSiM89
Copy link

maKSiM89 commented Jun 28, 2016

hi there!

I have installed [email protected] but it didn't help me.
I have also tried [email protected] but result the same.

@kennyt, any updates for this issue?

Thanks!

@ITernovtsii
Copy link

Hi @kennyt,
I have the same issue, tried increase node's stack-size but it brings Segmentation fault and memory allocation issues.
Any news about this?
Thanks.

@kostia-lev
Copy link

@diaborn19 I tested, it is caused by color.js that is dependency of grunt-html-validation. Not sure how this relates to purifycss. But error is in color.js and it is encountered during purifycss's work.

@ravi-gajera27
Copy link

How can i grunt purifycss on ng build --prod ???

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

6 participants