blueprints/ember-cli-standard/index.js
function (filePath) {
    var removeFile = this._removeFile.bind(this)
    var message = 'Should I remove `' + filePath + '`?'

    var promptPromise = this.ui.prompt({
      type: 'confirm',
      name: 'answer',
      message: message,
      choices: [
        { key: 'y', name: 'Yes, remove it', value: 'yes' },
        { key: 'n', name: 'No, leave it there', value: 'no' }
      ]
    })

    return promptPromise.then(function (response) {
      if (response.answer) {
        return removeFile(filePath)
      } else {
        return RSVP.resolve()
      }
    })
  }
function (filePath) {
    var removeFile = this._removeFile.bind(this)
    var message = 'Should I remove `' + filePath + '`?'

    var promptPromise = this.ui.prompt({
      type: 'confirm',
      name: 'answer',
      message: message,
      choices: [
        { key: 'y', name: 'Yes, remove it', value: 'yes' },
        { key: 'n', name: 'No, leave it there', value: 'no' }
      ]
    })

    return promptPromise.then(function (response) {
      if (response.answer) {
        return removeFile(filePath)
      } else {
        return RSVP.resolve()
      }
    })
  }
function ( filePath ) { var removeFile = this . _removeFile . bind ( this ) var message = 'Should I remove `' + filePath + '`?' var promptPromise = this . ui . prompt ( { type : 'confirm' , name : 'answer' , message : message , choices : [ { key : 'y' , name : 'Yes, remove it' , value : 'yes' } , { key : 'n' , name : 'No, leave it there' , value : 'no' } ] } ) return promptPromise . then ( function ( response ) { if ( response . answer ) { return removeFile ( filePath ) } else { return RSVP . resolve ( ) } } ) }
Prompt the user about whether or not they want to remove the given file

@param {string} filePath the path to the file
@return {RSVP.Promise}
Prompt the user about whether or not they want to remove the given file