Permalink
Browse files

feat: consola integration

  • Loading branch information...
pi0 committed Mar 31, 2018
1 parent 5367bd5 commit 4ec3b5dd0f15147ed8d5e0c5f11791b9a3f8a6b6
Showing with 1,260 additions and 1,124 deletions.
  1. +5 −7 lib/module.js
  2. +8 −8 package.json
  3. +1 −1 test/axios.test.js
  4. +1,246 −1,108 yarn.lock
@@ -1,6 +1,8 @@
const chalk = require('chalk')
const path = require('path')
const debug = require('debug')('nuxt:axios')
const consola = require('consola')

const logger = consola.withScope('nuxt:axios')

module.exports = function nuxtAxios (_moduleOptions) {
// Combine options
@@ -94,12 +96,8 @@ module.exports = function nuxtAxios (_moduleOptions) {
// Set _AXIOS_BASE_URL_ for dynamic SSR baseURL
process.env._AXIOS_BASE_URL_ = options.baseURL

/* eslint-disable no-console */
debug(
`BaseURL: ${chalk.green(options.baseURL)} (Browser: ${chalk.green(
options.browserBaseURL
)})`
)
logger.info(`BaseURL: ${chalk.green(options.baseURL)}`)
logger.info(`BaseURL (Browser): ${chalk.green(options.browserBaseURL)}`)
}

module.exports.meta = require('../package.json')
@@ -34,25 +34,25 @@
]
},
"dependencies": {
"@nuxtjs/proxy": "^1.1.4",
"@nuxtjs/proxy": "^1.2.1",
"axios": "^0.18.0",
"axios-retry": "^3.0.2",
"chalk": "^2.3.2",
"debug": "^3.1.0"
"consola": "^1.0.0"
},
"devDependencies": {
"codecov": "latest",
"eslint": "^4.17.0",
"eslint-config-standard": "11.0.0",
"eslint-plugin-import": "latest",
"eslint-plugin-jest": "latest",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-jest": "^21.15.0",
"eslint-plugin-node": "6.0.1",
"eslint-plugin-promise": "latest",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-standard": "latest",
"eslint-plugin-vue": "latest",
"jest": "latest",
"eslint-plugin-vue": "^4.4.0",
"jest": "^22.4.3",
"jsdom": "^11.6.2",
"nuxt": "^1.3.0",
"nuxt-edge": "^2.0.0-25375287.923164e",
"standard-version": "latest"
}
}
@@ -1,4 +1,4 @@
const { Nuxt, Builder } = require('nuxt')
const { Nuxt, Builder } = require('nuxt-edge')
const axios = require('axios')
const config = require('./fixture/nuxt.config')

Oops, something went wrong.

0 comments on commit 4ec3b5d

Please sign in to comment.