old_contents: // https://github.com/shelljs/shelljs
  require('./check-versions')()
  require('shelljs/global')
  env.NODE_ENV = 'production'
  
  var path = require('path')
  var config = require('../config')
  var ora = require('ora')
  var webpack = require('webpack')
  var webpackConfig = require('./webpack.prod.conf')
  
  if(process.argv.length >= 3) {
    for(var i = 2; i< process.argv.length; i++ ) {
      if(process.argv[i] === "watch") {
        webpackConfig.watch = true;
      }
    }
  }
  
  console.log(
    '  Tip:\n' +
    '  Built files are meant to be served over an HTTP server.\n' +
    '  Opening index.html over file:// won\'t work.\n'
  )
  
  var spinner = ora('building for production...')
  spinner.start()
  
  var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
  rm('-rf', assetsPath)
  mkdir('-p', assetsPath)
  cp('-R', 'static/*', assetsPath)
  
  webpack(webpackConfig, function (err, stats) {
    spinner.stop()
    if (err) throw err
    process.stdout.write(stats.toString({
      colors: true,
      modules: false,
      children: false,
      chunks: false,
      chunkModules: false
    }) + '\n')
  })
  
new_contents: // https://github.com/shelljs/shelljs
  require('./check-versions')()
  require('shelljs/global')
  env.NODE_ENV = 'production'
  
  var path = require('path')
  var config = require('../config')
  var ora = require('ora')
  var webpack = require('webpack')
  var webpackConfig = require('./webpack.prod.conf')
  
  webpackConfig.devtool = false;
  if(process.argv.length >= 3) {
    for(var i = 2; i< process.argv.length; i++ ) {
      if(process.argv[i] === "watch") {
        webpackConfig.watch = true;
        webpackConfig.devtool = '#source-map';
      }
    }
  }
  
  console.log(
    '  Tip:\n' +
    '  Built files are meant to be served over an HTTP server.\n' +
    '  Opening index.html over file:// won\'t work.\n'
  )
  
  var spinner = ora('building for production...')
  spinner.start()
  
  var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
  rm('-rf', assetsPath)
  mkdir('-p', assetsPath)
  cp('-R', 'static/*', assetsPath)
  
  webpack(webpackConfig, function (err, stats) {
    spinner.stop()
    if (err) throw err
    process.stdout.write(stats.toString({
      colors: true,
      modules: false,
      children: false,
      chunks: false,
      chunkModules: false
    }) + '\n')
  })
  
subject: watch modeの時だけsourceMapを作成するように変更