{"action":"created","issue":{"url":"https://api.github.com/repos/yeoman/generator-gulp-webapp/issues/443","labels_url":"https://api.github.com/repos/yeoman/generator-gulp-webapp/issues/443/labels{/name}","comments_url":"https://api.github.com/repos/yeoman/generator-gulp-webapp/issues/443/comments","events_url":"https://api.github.com/repos/yeoman/generator-gulp-webapp/issues/443/events","html_url":"https://github.com/yeoman/generator-gulp-webapp/issues/443","id":128011338,"number":443,"title":"How to turn off html / css minification","user":{"login":"mkoller","id":1036598,"avatar_url":"https://avatars.githubusercontent.com/u/1036598?v=3","gravatar_id":"","url":"https://api.github.com/users/mkoller","html_url":"https://github.com/mkoller","followers_url":"https://api.github.com/users/mkoller/followers","following_url":"https://api.github.com/users/mkoller/following{/other_user}","gists_url":"https://api.github.com/users/mkoller/gists{/gist_id}","starred_url":"https://api.github.com/users/mkoller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkoller/subscriptions","organizations_url":"https://api.github.com/users/mkoller/orgs","repos_url":"https://api.github.com/users/mkoller/repos","events_url":"https://api.github.com/users/mkoller/events{/privacy}","received_events_url":"https://api.github.com/users/mkoller/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-21T20:22:07Z","updated_at":"2016-01-21T21:45:34Z","closed_at":"2016-01-21T21:45:34Z","body":"Trying to figure out how to turn off html / css minification when I run `gulp` . I would like to uses this app for quick prototypes so I can easily just drag the compiled un-minified css and html into my visual studio project.\r\n\r\nLooks like my gulpfile.babel.js uses cssnano\r\n\r\n```javascript\r\n// generated on 2016-01-21 using generator-gulp-webapp 1.1.1\r\nimport gulp from 'gulp';\r\nimport gulpLoadPlugins from 'gulp-load-plugins';\r\nimport browserSync from 'browser-sync';\r\nimport del from 'del';\r\nimport {stream as wiredep} from 'wiredep';\r\n\r\nconst $ = gulpLoadPlugins();\r\nconst reload = browserSync.reload;\r\n\r\ngulp.task('styles', () => {\r\n  return gulp.src('app/styles/*.scss')\r\n    .pipe($.plumber())\r\n    .pipe($.sourcemaps.init())\r\n    .pipe($.sass.sync({\r\n      outputStyle: 'expanded',\r\n      precision: 10,\r\n      includePaths: ['.']\r\n    }).on('error', $.sass.logError))\r\n    .pipe($.autoprefixer({browsers: ['> 1%', 'last 2 versions', 'Firefox ESR']}))\r\n    .pipe($.sourcemaps.write())\r\n    .pipe(gulp.dest('.tmp/styles'))\r\n    .pipe(reload({stream: true}));\r\n});\r\n\r\ngulp.task('scripts', () => {\r\n  return gulp.src('app/scripts/**/*.js')\r\n    .pipe($.plumber())\r\n    .pipe($.sourcemaps.init())\r\n    .pipe($.babel())\r\n    .pipe($.sourcemaps.write('.'))\r\n    .pipe(gulp.dest('.tmp/scripts'))\r\n    .pipe(reload({stream: true}));\r\n});\r\n\r\nfunction lint(files, options) {\r\n  return () => {\r\n    return gulp.src(files)\r\n      .pipe(reload({stream: true, once: true}))\r\n      .pipe($.eslint(options))\r\n      .pipe($.eslint.format())\r\n      .pipe($.if(!browserSync.active, $.eslint.failAfterError()));\r\n  };\r\n}\r\nconst testLintOptions = {\r\n  env: {\r\n    mocha: true\r\n  }\r\n};\r\n\r\ngulp.task('lint', lint('app/scripts/**/*.js'));\r\ngulp.task('lint:test', lint('test/spec/**/*.js', testLintOptions));\r\n\r\ngulp.task('html', ['styles', 'scripts'], () => {\r\n  return gulp.src('app/*.html')\r\n    .pipe($.useref({searchPath: ['.tmp', 'app', '.']}))\r\n    .pipe($.if('*.js', $.uglify()))\r\n    .pipe($.if('*.css', $.cssnano()))\r\n    .pipe($.if('*.html', $.htmlmin({collapseWhitespace: true})))\r\n    .pipe(gulp.dest('dist'));\r\n});\r\n\r\ngulp.task('images', () => {\r\n  return gulp.src('app/images/**/*')\r\n    .pipe($.if($.if.isFile, $.cache($.imagemin({\r\n      progressive: true,\r\n      interlaced: true,\r\n      // don't remove IDs from SVGs, they are often used\r\n      // as hooks for embedding and styling\r\n      svgoPlugins: [{cleanupIDs: false}]\r\n    }))\r\n    .on('error', function (err) {\r\n      console.log(err);\r\n      this.end();\r\n    })))\r\n    .pipe(gulp.dest('dist/images'));\r\n});\r\n\r\ngulp.task('fonts', () => {\r\n  return gulp.src(require('main-bower-files')('**/*.{eot,svg,ttf,woff,woff2}', function (err) {})\r\n    .concat('app/fonts/**/*'))\r\n    .pipe(gulp.dest('.tmp/fonts'))\r\n    .pipe(gulp.dest('dist/fonts'));\r\n});\r\n\r\ngulp.task('extras', () => {\r\n  return gulp.src([\r\n    'app/*.*',\r\n    '!app/*.html'\r\n  ], {\r\n    dot: true\r\n  }).pipe(gulp.dest('dist'));\r\n});\r\n\r\ngulp.task('clean', del.bind(null, ['.tmp', 'dist']));\r\n\r\ngulp.task('serve', ['styles', 'scripts', 'fonts'], () => {\r\n  browserSync({\r\n    notify: false,\r\n    port: 9000,\r\n    server: {\r\n      baseDir: ['.tmp', 'app'],\r\n      routes: {\r\n        '/bower_components': 'bower_components'\r\n      }\r\n    }\r\n  });\r\n\r\n  gulp.watch([\r\n    'app/*.html',\r\n    '.tmp/scripts/**/*.js',\r\n    'app/images/**/*',\r\n    '.tmp/fonts/**/*'\r\n  ]).on('change', reload);\r\n\r\n  gulp.watch('app/styles/**/*.scss', ['styles']);\r\n  gulp.watch('app/scripts/**/*.js', ['scripts']);\r\n  gulp.watch('app/fonts/**/*', ['fonts']);\r\n  gulp.watch('bower.json', ['wiredep', 'fonts']);\r\n});\r\n\r\ngulp.task('serve:dist', () => {\r\n  browserSync({\r\n    notify: false,\r\n    port: 9000,\r\n    server: {\r\n      baseDir: ['dist']\r\n    }\r\n  });\r\n});\r\n\r\ngulp.task('serve:test', ['scripts'], () => {\r\n  browserSync({\r\n    notify: false,\r\n    port: 9000,\r\n    ui: false,\r\n    server: {\r\n      baseDir: 'test',\r\n      routes: {\r\n        '/scripts': '.tmp/scripts',\r\n        '/bower_components': 'bower_components'\r\n      }\r\n    }\r\n  });\r\n\r\n  gulp.watch('app/scripts/**/*.js', ['scripts']);\r\n  gulp.watch('test/spec/**/*.js').on('change', reload);\r\n  gulp.watch('test/spec/**/*.js', ['lint:test']);\r\n});\r\n\r\n// inject bower components\r\ngulp.task('wiredep', () => {\r\n  gulp.src('app/styles/*.scss')\r\n    .pipe(wiredep({\r\n      ignorePath: /^(\\.\\.\\/)+/\r\n    }))\r\n    .pipe(gulp.dest('app/styles'));\r\n\r\n  gulp.src('app/*.html')\r\n    .pipe(wiredep({\r\n      ignorePath: /^(\\.\\.\\/)*\\.\\./\r\n    }))\r\n    .pipe(gulp.dest('app'));\r\n});\r\n\r\ngulp.task('build', ['lint', 'html', 'images', 'fonts', 'extras'], () => {\r\n  return gulp.src('dist/**/*').pipe($.size({title: 'build', gzip: true}));\r\n});\r\n\r\ngulp.task('default', ['clean'], () => {\r\n  gulp.start('build');\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/yeoman/generator-gulp-webapp/issues/comments/173719097","html_url":"https://github.com/yeoman/generator-gulp-webapp/issues/443#issuecomment-173719097","issue_url":"https://api.github.com/repos/yeoman/generator-gulp-webapp/issues/443","id":173719097,"user":{"login":"silvenon","id":471278,"avatar_url":"https://avatars.githubusercontent.com/u/471278?v=3","gravatar_id":"","url":"https://api.github.com/users/silvenon","html_url":"https://github.com/silvenon","followers_url":"https://api.github.com/users/silvenon/followers","following_url":"https://api.github.com/users/silvenon/following{/other_user}","gists_url":"https://api.github.com/users/silvenon/gists{/gist_id}","starred_url":"https://api.github.com/users/silvenon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silvenon/subscriptions","organizations_url":"https://api.github.com/users/silvenon/orgs","repos_url":"https://api.github.com/users/silvenon/repos","events_url":"https://api.github.com/users/silvenon/events{/privacy}","received_events_url":"https://api.github.com/users/silvenon/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T21:45:34Z","updated_at":"2016-01-21T21:45:34Z","body":"```diff\r\n-   .pipe($.if('*.js', $.uglify()))\r\n-   .pipe($.if('*.css', $.cssnano()))\r\n-   .pipe($.if('*.html', $.htmlmin({collapseWhitespace: true})))\r\n```"}}