Hi, I understand. Im able to minimize my elements. My problem is with the core and paper elements. The vulcanize does not take a look to the dependent components. So, If I want to vulcanize or minimize the core-*/paper-* elements I have to declare explicit in the GruntFile one by one, including the dependent one. It is a very hard work and not work with all the components.
My problem uses several core-*/paper-* components (Almost 15 ) and it download a lot of dependent components. For example mydashboard page downloads 2mb in components and I want to reduce this number, not only for the size but also for the amount of time (it take almost 4seg). It would be great if bower contains a minimized version of the components(the html,css and js) Best Ignacio On Thu, Oct 30, 2014 at 6:09 PM, Rob Dodson <[email protected]> wrote: > In the yeoman generator we run vulcanize first, that runs uglify on the js > and concatenates the CSS, then we run the html minifier against what's left > over. So only using the minifier to compress the HTML and leaving JS and > CSS to vulcanize. The only problem I've noticed is the --strip flag does > not seem to work on the version of grunt-vulcanize that we're using so > comments remain in the page, otherwise everything is as compressed as I've > been able to get it. > > Try the yeoman generator and see if it meets your needs > > On Tue, Oct 28, 2014 at 9:07 AM, Ignacio Manzano < > [email protected]> wrote: > >> I tried it, but is not minimize all the html file. For example the >> inline <style> and <javascript> are not minimized and I got this >> Suggestions for this page >> Minify HTML for the following resources to reduce their size by 9.8KiB ( >> 44% reduction). >> >> - Minifying http://localhost:8088/.../core-overlay.html >> <http://localhost:8088/bower_components/core-overlay/core-overlay.html> >> could >> save 2.2KiB (45% reduction) after compression. See optimized content >> - Minifying http://localhost:8088/.../core-selector.html >> <http://localhost:8088/bower_components/core-selector/core-selector.html> >> could >> save 1.6KiB (50% reduction) after compression. See optimized content >> - Minifying http://localhost:8088/.../paper-ripple.html >> <http://localhost:8088/bower_components/paper-ripple/paper-ripple.html> >> could >> save 1.1KiB (33% reduction) after compression. See optimized content >> - Minifying http://localhost:8088/.../core-iconset.html >> <http://localhost:8088/bower_components/core-iconset/core-iconset.html> >> could >> save 1.0KiB (56% reduction) after compression. See optimized content >> - Minifying http://localhost:8088/.../core-a11y-keys.html >> >> <http://localhost:8088/bower_components/core-a11y-keys/core-a11y-keys.html> >> could >> save 918B (41% reduction) after compression. See optimized content >> - Minifying http://localhost:8088/.../core-style.html >> <http://localhost:8088/bower_components/core-style/core-style.html> could >> save 809B (35% reduction) after compression. See optimized content >> - Minifying http://localhost:8088/.../core-icon.html >> <http://localhost:8088/bower_components/core-icon/core-icon.html> could >> save 602B (47% reduction) after compression. See optimized content >> - Minifying http://localhost:8088/.../paper-dialog.html >> <http://localhost:8088/bower_components/paper-dialog/paper-dialog.html> >> could >> save 529B (50% reduction) after compression. See optimized content >> - Minifying http://localhost:8088/.../paper-shadow.html >> <http://localhost:8088/bower_components/paper-shadow/paper-shadow.html> >> could >> save 527B (38% reduction) after compression. See optimized content >> - Minifying http://localhost:8088/.../paper-focusable.html >> >> <http://localhost:8088/bower_components/paper-focusable/paper-focusable.html> >> could >> save 523B (53% reduction) after compression. See optimized content >> >> >> It means,I can reduce my site in 9Kb aprox only minimizing the inline js >> and css >> >> Thanks >> Ignacio >> >> On Mon, Oct 27, 2014 at 10:25 PM, Rob Dodson <[email protected]> >> wrote: >> >>> I should clarify this a bit more. The generator previously used htmlmin >>> but it was way too brittle and kept breaking on me. There were some >>> elements that would just destroy it. htmlmin is just a bunch of regex >>> whereas minifyhtml has an actual html parser that it uses. >>> >>> On Mon, Oct 27, 2014 at 6:24 PM, Rob Dodson <[email protected]> >>> wrote: >>> >>>> my advice, don't use htmlmin. Use minifyhtml, see the grunt file for >>>> the current generator-polymer ( >>>> https://github.com/yeoman/generator-polymer/blob/master/app/templates/Gruntfile.js >>>> ) >>>> >>>> On Thu, Oct 23, 2014 at 11:27 AM, 'Daniel Freedman' via Polymer < >>>> [email protected]> wrote: >>>> >>>>> collapseBooleanAttributes should be false since "selected" is >>>>> considered a boolean attribute: >>>>> http://perfectionkills.com/experimenting-with-html-minifier/#collapse_boolean_attributes >>>>> >>>>> On Thu, Oct 23, 2014 at 11:13 AM, <[email protected]> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> Yes, sorry. >>>>>> >>>>>> Im using grunt as following >>>>>> >>>>>> htmlmin: { >>>>>> dist: { >>>>>> options: { >>>>>> collapseWhitespace: true, >>>>>> conservativeCollapse: true, >>>>>> collapseBooleanAttributes: true, >>>>>> removeCommentsFromCDATA: true, >>>>>> removeOptionalTags: true, >>>>>> removeComments:true, >>>>>> minifyJS:true, >>>>>> minifyCSS:true >>>>>> }, >>>>>> files: [{ >>>>>> expand: true, >>>>>> cwd: '<%= yeoman.dist %>', >>>>>> src: ['*.html', 'views/{,*/}*.html'], >>>>>> dest: '<%= yeoman.dist %>' >>>>>> },{ >>>>>> expand: true, >>>>>> cwd: '<%= yeoman.dist %>', >>>>>> src: [ >>>>>> 'bower_components/{,*/}core-overlay.html', >>>>>> 'bower_components/{,*/}core-selector.html', >>>>>> 'bower_components/{,*/}core-a11y-keys.html', >>>>>> 'bower_components/{,*/}paper-ripple.html', >>>>>> 'bower_components/{,*/}core-style.html', >>>>>> 'bower_components/{,*/}core-iconset.html', >>>>>> 'bower_components/{,*/}core-icons.html', >>>>>> 'bower_components/{,*/}core-transition-css.html', >>>>>> 'bower_components/{,*/}paper-shadow.html', >>>>>> 'bower_components/{,*/}core-icon.html', >>>>>> 'bower_components/{,*/}core-dropdown.html', >>>>>> /*'bower_components/{,*//*}paper-dialog.html',*/ >>>>>> 'bower_components/{,*/}core-selection.html', >>>>>> 'bower_components/{,*/}core-iconset-svg.html', >>>>>> 'bower_components/{,*/}core-collapse.html', >>>>>> 'bower_components/{,*/}core-transition.html', >>>>>> 'bower_components/{,*/}paper-icon-button.html', >>>>>> 'bower_components/{,*/}paper-button.html', >>>>>> 'bower_components/{,*/}core-meta.html', >>>>>> 'bower_components/{,*/}paper-menu-button.html', >>>>>> 'bower_components/{,*/}core-dropdown-overlay.html', >>>>>> 'bower_components/{,*/}paper-focusable.html', >>>>>> /*'bower_components/{,*//*}paper-radio-button.html',*/ >>>>>> 'bower_components/{,*/}core-submenu.html', >>>>>> /*'bower_components/{,*//*}paper-checkbox.html',*/ >>>>>> /*'bower_components/{,*//*}paper-item.html',*/ >>>>>> 'bower_components/{,*/}core-menu.html', >>>>>> 'bower_components/{,*/}layout.html', >>>>>> >>>>>> 'bower_components/{,*/}paper-menu-button-transition.html', >>>>>> 'bower_components/{,*/}paper-button-base.html', >>>>>> 'bower_components/{,*/}core-overlay-layer.html', >>>>>> 'bower_components/{,*/}paper-radio-group.html', >>>>>> /*'bower_components/{,*//*}core-item.html',*/ >>>>>> 'bower_components/{,*/}core-icons.html', >>>>>> 'bower_components/{,*/}polymer.html', >>>>>> 'bower_components/{,*/}paper-dialog-transition.html', >>>>>> 'bower_components/{,*/}core-key-helper.html', >>>>>> 'bower_components/{,*/}web-animations.html', >>>>>> /*'bower_components/{,*//*}core-header-panel.html',*/ >>>>>> // 'bower_components/{,*/}core-drawer-panel.html', >>>>>> 'bower_components/{,*/}core-toolbar.html', >>>>>> 'bower_components/{,*/}core-media-query.html', >>>>>> >>>>>> /*'bower_components/{,*//*}paper-dropdown-menu.html',*/ >>>>>> 'bower_components/{,*/}core-range.html', >>>>>> 'bower_components/{,*/}paper-progress.html' >>>>>> /*'bower_components/{,*//*}core-input.html',*/ >>>>>> /*'bower_components/{,*//*}paper-input.html'*/], >>>>>> dest: '<%= yeoman.dist %>' >>>>>> }] >>>>>> } >>>>>> } >>>>>> >>>>>> Just when I copied the text I realize that the issue is with " >>>>>> collapseBooleanAttributes: >>>>>> true," >>>>>> >>>>>> Sorry for the inconveniences. >>>>>> >>>>>> Best Regards, >>>>>> Ignacio >>>>>> >>>>>> >>>>>> On Thursday, October 23, 2014 2:56:45 PM UTC-3, Eric Bidelman wrote: >>>>>>> >>>>>>> Can you be more specific on the minifier you're using? It shouldn't >>>>>>> trip out attribute values from the markup. >>>>>>> >>>>>>> On Thu, Oct 23, 2014 at 10:46 AM, <[email protected]> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> >>>>>>>> If my code use some polymer elements that have attribute like >>>>>>>> "select='something'" and I try to minify my file, the generate html >>>>>>>> file is >>>>>>>> broken. How ? >>>>>>>> >>>>>>>> If I have >>>>>>>> >>>>>>>> {code} >>>>>>>> <core-selector selected="tab1" horizontal justified layout center> >>>>>>>> .... >>>>>>>> </core-selector> >>>>>>>> {code} >>>>>>>> >>>>>>>> the minify version is >>>>>>>> >>>>>>>> {code} >>>>>>>> <core-selector selected horizontal justified layout >>>>>>>> center>....</core-selector> >>>>>>>> {code} >>>>>>>> >>>>>>>> is there a way to specify not to resolver the select attribute ? >>>>>>>> If I modify the polymer element and change selected to >>>>>>>> selectedElement or another name it work without problem. >>>>>>>> >>>>>>>> Today minify my html and polymer elements are crucial because my >>>>>>>> page use several polymer elements (almost 8) and without minification >>>>>>>> the >>>>>>>> page is huge and heavy. >>>>>>>> >>>>>>>> Also...can Polymer provides a minimised version of the components >>>>>>>> (css, js, html) ? >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Ignacio >>>>>>>> >>>>>>>> Follow Polymer on Google+: plus.google.com/107187849809354688692 >>>>>>>> --- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "Polymer" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to [email protected]. >>>>>>>> To view this discussion on the web visit >>>>>>>> https://groups.google.com/d/msgid/polymer-dev/b9cd9dd4- >>>>>>>> 8a94-4e7c-b80a-75937e97304a%40googlegroups.com >>>>>>>> <https://groups.google.com/d/msgid/polymer-dev/b9cd9dd4-8a94-4e7c-b80a-75937e97304a%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>> . >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> >>>>>>> Follow Polymer on Google+: plus.google.com/107187849809354688692 >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Polymer" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/polymer-dev/63f85554-971f-4979-9d8d-31877c257ed2%40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/polymer-dev/63f85554-971f-4979-9d8d-31877c257ed2%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> Follow Polymer on Google+: plus.google.com/107187849809354688692 >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Polymer" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/polymer-dev/CAAUAVAiDvrmm2G77pXO8VWZ1Zhzw8BGag3yH-cEse7%2BnhWS%2B%2BQ%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/polymer-dev/CAAUAVAiDvrmm2G77pXO8VWZ1Zhzw8BGag3yH-cEse7%2BnhWS%2B%2BQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> >>> >> > Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAGwniLrRjDGRBvj9MxcUb3HjEC5pNtyEa60vrQc7r61EP%2Bf_hw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
