nav tabs on admin dashboard
This commit is contained in:
+17
-15
@@ -2,21 +2,23 @@
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
function AppendPlugin(source, appending, target) {
|
||||
this.source = source;
|
||||
this.appending = appending;
|
||||
this.target = target;
|
||||
}
|
||||
module.exports = AppendPlugin;
|
||||
"use strict";
|
||||
|
||||
AppendPlugin.prototype.apply = function(resolver) {
|
||||
var target = this.target;
|
||||
var appending = this.appending;
|
||||
resolver.plugin(this.source, function(request, callback) {
|
||||
var obj = Object.assign({}, request, {
|
||||
path: request.path + appending,
|
||||
relativePath: request.relativePath && (request.relativePath + appending)
|
||||
module.exports = class AppendPlugin {
|
||||
constructor(source, appending, target) {
|
||||
this.source = source;
|
||||
this.appending = appending;
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
apply(resolver) {
|
||||
const target = resolver.ensureHook(this.target);
|
||||
resolver.getHook(this.source).tapAsync("AppendPlugin", (request, resolveContext, callback) => {
|
||||
const obj = Object.assign({}, request, {
|
||||
path: request.path + this.appending,
|
||||
relativePath: request.relativePath && (request.relativePath + this.appending)
|
||||
});
|
||||
resolver.doResolve(target, obj, this.appending, resolveContext, callback);
|
||||
});
|
||||
resolver.doResolve(target, obj, appending, callback);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user