yeoman / generator-angular

Yeoman generator for AngularJS
http://yeoman.io
5.73k stars 1.44k forks source link

htmlmin settings incomplete #1307

Open JoernBerkefeld opened 8 years ago

JoernBerkefeld commented 8 years ago

it currently reads as follows for the htmlmin task:

    options: {
      collapseWhitespace: true,
      conservativeCollapse: true,
      collapseBooleanAttributes: true,
      removeCommentsFromCDATA: true
    }

that's quite insufficient because inline JS and CSS will stay as is, so will html comments. Instead the options should be set to:

    options: {
      removeComments: true, // **new**
      minifyJS: true, // **new**
      minifyCSS: true, // **new**
      collapseWhitespace: true,
      conservativeCollapse: true,
      collapseBooleanAttributes: true,
      removeCommentsFromCDATA: true
    }
eddiemonge commented 8 years ago

HTML comments might be essential, especially if people are using that for angular (eww though). The other options are interesting