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

@@ -58,8 +58,17 @@ class Entry {
);
}
let vendorPath = extraction.output
? new File(extraction.output)
let outputPath = extraction.output;
// If the extraction output path begins with a slash (forward or backward)
// then the path from the public directory determined below will be wrong
// on Windows, as a drive letter will be incorrectly prepended to
// (e.g. '/dist/vendor' -> 'C:\dist\vendor').
let startsWithSlash = ['\\', '/'].indexOf(outputPath[0]) >= 0;
outputPath = startsWithSlash ? outputPath.substr(1) : outputPath;
let vendorPath = outputPath
? new File(outputPath)
.pathFromPublic(Config.publicPath)
.replace(/\.js$/, '')
.replace(/\\/g, '/')
@@ -104,7 +113,11 @@ class Entry {
*/
normalizePath(output, fallback) {
// All output paths need to start at the project's public dir.
if (!output.pathFromPublic().startsWith('/' + Config.publicPath)) {
let pathFromPublicDir = output.pathFromPublic();
if (
!pathFromPublicDir.startsWith('/' + Config.publicPath) &&
!pathFromPublicDir.startsWith('\\' + Config.publicPath)
) {
output = new File(
path.join(Config.publicPath, output.pathFromPublic())
);