hunk.code_window: [commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
   [corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html
   [dev-doc]: https://github.com/angular/angular/blob/master/DEVELOPER.md
   [github]: https://github.com/angular/angular-cli
   [gitter]: https://gitter.im/angular/angular-cli
   [individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html
   [js-style-guide]: https://google.github.io/styleguide/jsguide.html
   [jsfiddle]: http://jsfiddle.net/
   [plunker]: http://plnkr.co/edit
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit: [GitHub]: https://github.com/angular/angular-cli
  
hunk.file_path: CONTRIBUTING.md
hunk.type: replace
file: import {normalize} from 'path';
  
  import {createProjectFromAsset} from '../../../utils/assets';
  import {exec} from '../../../utils/process';
  import {updateJsonFile} from '../../../utils/project';
  import {expectFileSizeToBeUnder, expectFileToExist} from '../../../utils/fs';
  import {expectToFail} from '../../../utils/utils';
  
  
  export default function(skipCleaning: () => void) {
    return Promise.resolve()
      .then(() => createProjectFromAsset('webpack/test-app-weird'))
      .then(() => exec(normalize('node_modules/.bin/webpack'), '-p'))
      .then(() => expectFileToExist('dist/app.main.js'))
      .then(() => expectFileToExist('dist/0.app.main.js'))
      .then(() => expectFileToExist('dist/1.app.main.js'))
      .then(() => expectFileToExist('dist/2.app.main.js'))
      .then(() => expectFileSizeToBeUnder('dist/app.main.js', 400000))
      .then(() => expectFileSizeToBeUnder('dist/0.app.main.js', 40000))
  
      // Skip code generation and rebuild.
      .then(() => updateJsonFile('aotplugin.config.json', json => {
        json['skipCodeGeneration'] = true;
      }))
      .then(() => exec(normalize('node_modules/.bin/webpack'), '-p'))
      .then(() => expectFileToExist('dist/app.main.js'))
      .then(() => expectFileToExist('dist/0.app.main.js'))
      .then(() => expectFileToExist('dist/1.app.main.js'))
      .then(() => expectFileToExist('dist/2.app.main.js'))
      .then(() => expectToFail(() => expectFileSizeToBeUnder('dist/app.main.js', 400000)))
      .then(() => expectFileSizeToBeUnder('dist/0.app.main.js', 40000))
      .then(() => skipCleaning());
  }
  