nav tabs on admin dashboard
This commit is contained in:
30
node_modules/css-loader/lib/processCss.js
generated
vendored
30
node_modules/css-loader/lib/processCss.js
generated
vendored
@@ -6,7 +6,6 @@ var formatCodeFrame = require("babel-code-frame");
|
||||
var Tokenizer = require("css-selector-tokenizer");
|
||||
var postcss = require("postcss");
|
||||
var loaderUtils = require("loader-utils");
|
||||
var assign = require("object-assign");
|
||||
var getLocalIdent = require("./getLocalIdent");
|
||||
|
||||
var icssUtils = require('icss-utils');
|
||||
@@ -56,8 +55,8 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) {
|
||||
values.nodes[0].nodes.shift();
|
||||
var mediaQuery = Tokenizer.stringifyValues(values);
|
||||
|
||||
if(loaderUtils.isUrlRequest(url, options.root)) {
|
||||
url = loaderUtils.urlToRequest(url, options.root);
|
||||
if(loaderUtils.isUrlRequest(url)) {
|
||||
url = loaderUtils.urlToRequest(url);
|
||||
}
|
||||
|
||||
importItems.push({
|
||||
@@ -85,11 +84,6 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) {
|
||||
exports[exportName] = replaceImportsInString(exports[exportName]);
|
||||
});
|
||||
|
||||
function isAlias(url) {
|
||||
// Handle alias starting by / and root disabled
|
||||
return url !== options.resolve(url)
|
||||
}
|
||||
|
||||
function processNode(item) {
|
||||
switch (item.type) {
|
||||
case "value":
|
||||
@@ -105,7 +99,7 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) {
|
||||
}
|
||||
break;
|
||||
case "url":
|
||||
if (options.url && item.url.replace(/\s/g, '').length && !/^#/.test(item.url) && (isAlias(item.url) || loaderUtils.isUrlRequest(item.url, options.root))) {
|
||||
if (options.url && item.url.replace(/\s/g, '').length && !/^#/.test(item.url) && loaderUtils.isUrlRequest(item.url)) {
|
||||
// Strip quotes, they will be re-added if the module needs them
|
||||
item.stringType = "";
|
||||
delete item.innerSpacingBefore;
|
||||
@@ -141,17 +135,13 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) {
|
||||
|
||||
module.exports = function processCss(inputSource, inputMap, options, callback) {
|
||||
var query = options.query;
|
||||
var root = query.root && query.root.length > 0 ? query.root.replace(/\/$/, "") : query.root;
|
||||
var context = query.context;
|
||||
var localIdentName = query.localIdentName || "[hash:base64]";
|
||||
var localIdentRegExp = query.localIdentRegExp;
|
||||
var forceMinimize = query.minimize;
|
||||
var minimize = typeof forceMinimize !== "undefined" ? !!forceMinimize : options.minimize;
|
||||
|
||||
var customGetLocalIdent = query.getLocalIdent || getLocalIdent;
|
||||
|
||||
var parserOptions = {
|
||||
root: root,
|
||||
mode: options.mode,
|
||||
url: query.url !== false,
|
||||
import: query.import !== false,
|
||||
@@ -166,11 +156,11 @@ module.exports = function processCss(inputSource, inputMap, options, callback) {
|
||||
if(parserOptions.url){
|
||||
url = url.trim();
|
||||
|
||||
if(!url.replace(/\s/g, '').length || !loaderUtils.isUrlRequest(url, root)) {
|
||||
if(!url.replace(/\s/g, '').length || !loaderUtils.isUrlRequest(url)) {
|
||||
return url;
|
||||
}
|
||||
if(global) {
|
||||
return loaderUtils.urlToRequest(url, root);
|
||||
return loaderUtils.urlToRequest(url);
|
||||
}
|
||||
}
|
||||
return url;
|
||||
@@ -189,16 +179,6 @@ module.exports = function processCss(inputSource, inputMap, options, callback) {
|
||||
parserPlugin(parserOptions)
|
||||
]);
|
||||
|
||||
if(minimize) {
|
||||
var cssnano = require("cssnano");
|
||||
var minimizeOptions = assign({}, query.minimize);
|
||||
["zindex", "normalizeUrl", "discardUnused", "mergeIdents", "reduceIdents", "autoprefixer"].forEach(function(name) {
|
||||
if(typeof minimizeOptions[name] === "undefined")
|
||||
minimizeOptions[name] = false;
|
||||
});
|
||||
pipeline.use(cssnano(minimizeOptions));
|
||||
}
|
||||
|
||||
pipeline.process(inputSource, {
|
||||
// we need a prefix to avoid path rewriting of PostCSS
|
||||
from: "/css-loader!" + options.from,
|
||||
|
||||
Reference in New Issue
Block a user