bin/init.js
function addPackageFile (devDependency = false, extraOptions = null) {
    var packageJSON = {
      name: 'app',
      description: 'Vue Build Application',
      version: '0.1.0',
      dependencies: {
        'vue-build': '^' + require('../package').version
      }
    }

    if (devDependency) {
      packageJSON.devDependencies = {
        'vue-build': packageJSON.dependencies['vue-build']
      }
      delete packageJSON.dependencies['vue-build']
    }

    if (extraOptions) {
      packageJSON = Object.assign({}, packageJSON, extraOptions)
    }

    fs.writeFileSync(
      path.join(projectRoot, 'package.json'),
      JSON.stringify(packageJSON, null, 2)
    )
  }
function addPackageFile (devDependency = false, extraOptions = null) {
    var packageJSON = {
      name: 'app',
      description: 'Vue Build Application',
      version: '0.1.0',
      dependencies: {
        'vue-build': '^' + require('../package').version
      }
    }

    if (devDependency) {
      packageJSON.devDependencies = {
        'vue-build': packageJSON.dependencies['vue-build']
      }
      delete packageJSON.dependencies['vue-build']
    }

    if (extraOptions) {
      packageJSON = Object.assign({}, packageJSON, extraOptions)
    }

    fs.writeFileSync(
      path.join(projectRoot, 'package.json'),
      JSON.stringify(packageJSON, null, 2)
    )
  }
function addPackageFile ( devDependency = false , extraOptions = null ) { var packageJSON = { name : 'app' , description : 'Vue Build Application' , version : '0.1.0' , dependencies : { 'vue-build' : '^' + require ( '../package' ) . version } } if ( devDependency ) { packageJSON . devDependencies = { 'vue-build' : packageJSON . dependencies [ 'vue-build' ] } delete packageJSON . dependencies [ 'vue-build' ] } if ( extraOptions ) { packageJSON = Object . assign ( { } , packageJSON , extraOptions ) } fs . writeFileSync ( path . join ( projectRoot , 'package.json' ) , JSON . stringify ( packageJSON , null , 2 ) ) }
Add package.json file
Add package . json file