code: function main (words, userConfigs) {
    debug('run with arguments %O', {
      words,
      userConfigs
    })
  
    let configs = assign({}, defaultConfigs, userConfigs)
  
    debug('use configs %O', configs)
  
    if (!words) {
      return Promise.reject(new Error('请输入要查询的文字'))
    }
  
    const baseUrl = 'https://translate.google.cn'
    let fetchBody, url, api
  
    return getToken(words, configs)
      .then(token => {
        fetchBody = getFetchData(words, token)
  
        url = `${baseUrl}/#view=home&op=translate&sl=${fetchBody.sl}&tl=${fetchBody.tl}&text=${encodeURIComponent(words)}`
        api = `${baseUrl}/translate_a/single?${querystring.stringify(fetchBody)}`
  
        debug(`fetch url: ${url.replace(/%/g, '%%')}`)
        debug(`fetch api: ${api.replace(/%/g, '%%')}`)
  
        return fetch(api, configs)
      })
      .then(data => parser(data, words))
      .catch(error => {
        debug(error)
  
        if (error.name === 'FetchError') {
          return new EDOutput(CODES.NETWORK_ERROR)
        }
  
        return new EDOutput(CODES.OTHER)
      })
      .then(output => {
        // 添加插件信息
        output.pluginName = 'Google'
        output.packageName = pkg.name
        output.words = words
        output.url = url
  
        debug('output: %O', output)
  
        return output
      })
  }
docs: 入口