nav tabs on admin dashboard
This commit is contained in:
25
node_modules/yargs/lib/apply-extends.js
generated
vendored
25
node_modules/yargs/lib/apply-extends.js
generated
vendored
@@ -1,13 +1,14 @@
|
||||
var fs = require('fs')
|
||||
var path = require('path')
|
||||
var assign = require('./assign')
|
||||
var YError = require('./yerror')
|
||||
|
||||
var previouslyVisitedConfigs = []
|
||||
'use strict'
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const YError = require('./yerror')
|
||||
|
||||
function checkForCircularExtends (path) {
|
||||
if (previouslyVisitedConfigs.indexOf(path) > -1) {
|
||||
throw new YError("Circular extended configurations: '" + path + "'.")
|
||||
let previouslyVisitedConfigs = []
|
||||
|
||||
function checkForCircularExtends (cfgPath) {
|
||||
if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
|
||||
throw new YError(`Circular extended configurations: '${cfgPath}'.`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,12 +17,12 @@ function getPathToDefaultConfig (cwd, pathToExtend) {
|
||||
}
|
||||
|
||||
function applyExtends (config, cwd) {
|
||||
var defaultConfig = {}
|
||||
let defaultConfig = {}
|
||||
|
||||
if (config.hasOwnProperty('extends')) {
|
||||
if (typeof config.extends !== 'string') return defaultConfig
|
||||
var isPath = /\.json$/.test(config.extends)
|
||||
var pathToDefault = null
|
||||
const isPath = /\.json|\..*rc$/.test(config.extends)
|
||||
let pathToDefault = null
|
||||
if (!isPath) {
|
||||
try {
|
||||
pathToDefault = require.resolve(config.extends)
|
||||
@@ -46,7 +47,7 @@ function applyExtends (config, cwd) {
|
||||
|
||||
previouslyVisitedConfigs = []
|
||||
|
||||
return assign(defaultConfig, config)
|
||||
return Object.assign({}, defaultConfig, config)
|
||||
}
|
||||
|
||||
module.exports = applyExtends
|
||||
|
||||
Reference in New Issue
Block a user