docs: def bootstrap(name, user=None, silent=True):
      '''
      Bootstraps a node.js application.
  
      Will execute 'npm install --json' on the specified directory.
  
      user
          The user to run NPM with
  
          .. versionadded:: 0.17.0
      '''
      ret = {'name': name, 'result': None, 'comment': '', 'changes': {}}
  
      if __opts__['test']:
          try:
              call = __salt__['npm.install'](dir=name, runas=user, pkg=None, silent=silent, dry_run=True)
              if call:
                  ret['result'] = None
                  ret['changes'] = {'old': [], 'new': call}
                  ret['comment'] = '{0} is set to be bootstrapped'.format(name)
              else:
                  ret['result'] = True
                  ret['comment'] = '{0} is already bootstrapped'.format(name)
          except (CommandNotFoundError, CommandExecutionError) as err:
              ret['result'] = False
              ret['comment'] = 'Error Bootstrapping \'{0}\': {1}'.format(name, err)
          return ret
  
      try:
          call = __salt__['npm.install'](dir=name, runas=user, pkg=None, silent=silent)
      except (CommandNotFoundError, CommandExecutionError) as err:
          ret['result'] = False
          ret['comment'] = 'Error Bootstrapping \'{0}\': {1}'.format(name, err)
          return ret
  
      if not call:
          ret['result'] = True
          ret['comment'] = 'Directory is already bootstrapped'
          return ret
  
      # npm.install will return a string if it can't parse a JSON result
      if isinstance(call, six.string_types):
          ret['result'] = False
          ret['changes'] = call
          ret['comment'] = 'Could not bootstrap directory'
      else:
          ret['result'] = True
          ret['changes'] = {name: 'Bootstrapped'}
          ret['comment'] = 'Directory was successfully bootstrapped'
  
      return ret