nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions

View File

@@ -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