Open mchayka opened 8 years ago
Thanks for reporting this. Can I see the way you use the task?
Can you force it to use v1.1.1 of PurifyCSS and let me know if that works? That'll help me debug
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
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 purify-css@1.0.16
and then run the task
Before you do that, be sure to get me the list of files that get logged out :)
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.
Do you think you can email me your build/stylesheets/style.css
? (before it gets purified) kenny8tran@gmail.com I'd like to figure out this bug
Done
@kennyt Did you find a solution for the issue?
hi there!
I have installed purify-css@1.0.16 but it didn't help me. I have also tried purify-css@1.0.17 but result the same.
@kennyt, any updates for this issue?
Thanks!
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.
@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.
How can i grunt purifycss on ng build --prod ???
After updating npm packages, my grunt purifycss task stopped working with error message
It worked well before updating. One difference is version of purifycss dependency.