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

@@ -2,6 +2,65 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
<a name="7.1.0"></a>
# [7.1.0](https://github.com/webpack-contrib/sass-loader/compare/v7.0.3...v7.1.0) (2018-08-01)
### Features
* Make this package implementation-agnostic (#573) ([bed9fb5](https://github.com/webpack-contrib/sass-loader/commit/bed9fb5)), closes [#435](https://github.com/webpack-contrib/sass-loader/issues/435)
<a name="7.0.3"></a>
## [7.0.3](https://github.com/webpack-contrib/sass-loader/compare/v7.0.2...v7.0.3) (2018-06-05)
### Bug Fixes
* Bare imports not working sometimes (#579) ([c348281](https://github.com/webpack-contrib/sass-loader/commit/c348281)), closes [#566](https://github.com/webpack-contrib/sass-loader/issues/566)
<a name="7.0.2"></a>
## [7.0.2](https://github.com/webpack-contrib/sass-loader/compare/v7.0.1...v7.0.2) (2018-06-02)
### Bug Fixes
* Errors being swallowed when trying to load node-sass (#576) ([6dfb274](https://github.com/webpack-contrib/sass-loader/commit/6dfb274)), closes [#563](https://github.com/webpack-contrib/sass-loader/issues/563)
* Report error to user for problems loading node-sass (#562) ([2529c07](https://github.com/webpack-contrib/sass-loader/commit/2529c07))
<a name="7.0.1"></a>
## [7.0.1](https://github.com/webpack-contrib/sass-loader/compare/v7.0.0...v7.0.1) (2018-04-13)
### Bug Fixes
* Wrong import precedence (#557) ([f4eeff1](https://github.com/webpack-contrib/sass-loader/commit/f4eeff1))
<a name="7.0.0"></a>
# [7.0.0](https://github.com/webpack-contrib/sass-loader/compare/v6.0.7...v7.0.0) (2018-04-13)
### Features
* Refactor resolving and simplify webpack config aliases (#479) ([e0fde1a](https://github.com/webpack-contrib/sass-loader/commit/e0fde1a))
* Remove `node-sass` from `peerDependencies` (#533) ([6439cef](https://github.com/webpack-contrib/sass-loader/commit/6439cef))
### BREAKING CHANGES
* Drop official node 4 support
* This slightly changes the resolving algorithm. Should not break in normal usage, but might break in complex configurations.
* The sass-loader throws an error at runtime now and refuses to compile if the peer dependency is wrong. This could break applications where npm's peer dependency warning was just ignored.
<a name="6.0.7"></a>
## [6.0.7](https://github.com/webpack-contrib/sass-loader/compare/v6.0.6...v6.0.7) (2018-03-03)

114
node_modules/sass-loader/README.md generated vendored
View File

@@ -14,11 +14,11 @@
<img width="200" height="200"
src="https://webpack.js.org/assets/icon-square-big.svg">
</a>
<h1>SASS Loader</h1>
<p>Loads a SASS/SCSS file and compiles it to CSS.</p>
<h1>Sass Loader</h1>
<p>Loads a Sass/SCSS file and compiles it to CSS.</p>
</div>
Use the [css-loader](https://github.com/webpack-contrib/css-loader) or the [raw-loader](https://github.com/webpack-contrib/raw-loader) to turn it into a JS module and the [ExtractTextPlugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) to extract it into a separate file.
Use the [css-loader](https://github.com/webpack-contrib/css-loader) or the [raw-loader](https://github.com/webpack-contrib/raw-loader) to turn it into a JS module and the [MiniCssExtractPlugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to extract it into a separate file.
Looking for the webpack 1 loader? Check out the [archive/webpack-1 branch](https://github.com/webpack-contrib/sass-loader/tree/archive/webpack-1).
<h2 align="center">Install</h2>
@@ -27,8 +27,14 @@ Looking for the webpack 1 loader? Check out the [archive/webpack-1 branch](https
npm install sass-loader node-sass webpack --save-dev
```
The sass-loader requires [node-sass](https://github.com/sass/node-sass) and [webpack](https://github.com/webpack)
as [`peerDependency`](https://docs.npmjs.com/files/package.json#peerdependencies). Thus you are able to control the versions accurately.
The sass-loader requires [webpack](https://github.com/webpack) as a
[`peerDependency`](https://docs.npmjs.com/files/package.json#peerdependencies)
and it requires you to install either [Node Sass][] or [Dart Sass][] on your
own. This allows you to control the versions of all your dependencies, and to
choose which Sass implementation to use.
[Node Sass]: https://github.com/sass/node-sass
[Dart Sass]: http://sass-lang.com/dart-sass
<h2 align="center">Examples</h2>
@@ -45,19 +51,17 @@ module.exports = {
module: {
rules: [{
test: /\.scss$/,
use: [{
loader: "style-loader" // creates style nodes from JS strings
}, {
loader: "css-loader" // translates CSS into CommonJS
}, {
loader: "sass-loader" // compiles Sass to CSS
}]
use: [
"style-loader", // creates style nodes from JS strings
"css-loader", // translates CSS into CommonJS
"sass-loader" // compiles Sass to CSS, using Node Sass by default
]
}]
}
};
```
You can also pass options directly to [node-sass](https://github.com/andrew/node-sass) by specifying an `options` property like this:
You can also pass options directly to [Node Sass][] or [Dart Sass][]:
```js
// webpack.config.js
@@ -81,38 +85,82 @@ module.exports = {
};
```
See [node-sass](https://github.com/andrew/node-sass) for all available Sass options.
See [the Node Sass documentation](https://github.com/sass/node-sass/blob/master/README.md#options) for all available Sass options.
### In production
Usually, it's recommended to extract the style sheets into a dedicated file in production using the [ExtractTextPlugin](https://github.com/webpack-contrib/extract-text-webpack-plugin). This way your styles are not dependent on JavaScript:
The special `implementation` option determines which implementation of Sass to
use. It takes either a [Node Sass][] or a [Dart Sass][] module. For example, to
use Dart Sass, you'd pass:
```js
const ExtractTextPlugin = require("extract-text-webpack-plugin");
// ...
{
loader: "sass-loader",
options: {
implementation: require("sass")
}
}
// ...
```
const extractSass = new ExtractTextPlugin({
filename: "[name].[contenthash].css",
disable: process.env.NODE_ENV === "development"
});
Note that when using Dart Sass, **synchronous compilation is twice as fast as
asynchronous compilation** by default, due to the overhead of asynchronous
callbacks. To avoid this overhead, you can use the
[`fibers`](https://www.npmjs.com/package/fibers) package to call asynchronous
importers from the synchronous code path. To enable this, pass the `Fiber` class
to the `fiber` option:
```js
// webpack.config.js
const Fiber = require('fibers');
module.exports = {
...
module: {
rules: [{
test: /\.scss$/,
use: extractSass.extract({
use: [{
loader: "css-loader"
}, {
loader: "sass-loader"
}],
// use style-loader in development
fallback: "style-loader"
})
use: [{
loader: "style-loader"
}, {
loader: "css-loader"
}, {
loader: "sass-loader",
options: {
implementation: require("sass"),
fiber: Fiber
}
}]
}]
}
};
```
### In production
Usually, it's recommended to extract the style sheets into a dedicated file in production using the [MiniCssExtractPlugin](https://github.com/webpack-contrib/mini-css-extract-plugin). This way your styles are not dependent on JavaScript:
```js
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
...
module: {
rules: [{
test: /\.scss$/,
use: [
// fallback to style-loader in development
process.env.NODE_ENV !== 'production' ? 'style-loader' : MiniCssExtractPlugin.loader,
"css-loader",
"sass-loader"
]
}]
},
plugins: [
extractSass
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: "[name].css",
chunkFilename: "[id].css"
})
]
};
```
@@ -121,7 +169,7 @@ module.exports = {
### Imports
webpack provides an [advanced mechanism to resolve files](https://webpack.js.org/concepts/module-resolution/). The sass-loader uses node-sass' custom importer feature to pass all queries to the webpack resolving engine. Thus you can import your Sass modules from `node_modules`. Just prepend them with a `~` to tell webpack that this is not a relative import:
webpack provides an [advanced mechanism to resolve files](https://webpack.js.org/concepts/module-resolution/). The sass-loader uses Sass's custom importer feature to pass all queries to the webpack resolving engine. Thus you can import your Sass modules from `node_modules`. Just prepend them with a `~` to tell webpack that this is not a relative import:
```css
@import "~bootstrap/dist/css/bootstrap";

View File

@@ -1,58 +1,60 @@
"use strict";
const path = require("path");
const utils = require("loader-utils");
// libsass uses this precedence when importing files without extension
const extPrecedence = [".scss", ".sass", ".css"];
const matchModuleImport = /^~([^\/]+|@[^\/]+[\/][^\/]+)$/;
/**
* When libsass tries to resolve an import, it uses a special algorithm.
* Since the sass-loader uses webpack to resolve the modules, we need to simulate that algorithm. This function
* returns an array of import paths to try.
* returns an array of import paths to try. The last entry in the array is always the original url
* to enable straight-forward webpack.config aliases.
*
* @param {string} request
* @param {string} url
* @returns {Array<string>}
*/
function importsToResolve(request) {
// libsass' import algorithm works like this:
// In case there is no file extension...
// - Prefer modules starting with '_'.
// - File extension precedence: .scss, .sass, .css.
// In case there is a file extension...
// - If the file is a CSS-file, do not include it all, but just link it via @import url().
// - The exact file name must match (no auto-resolving of '_'-modules).
function importsToResolve(url) {
const request = utils.urlToRequest(url);
// Keep in mind: ext can also be something like '.datepicker' when the true extension is omitted and the filename contains a dot.
// @see https://github.com/webpack-contrib/sass-loader/issues/167
const ext = path.extname(request);
const basename = path.basename(request);
const dirname = path.dirname(request);
const startsWithUnderscore = basename.charAt(0) === "_";
const hasCssExt = ext === ".css";
const hasSassExt = ext === ".scss" || ext === ".sass";
// a module import is an identifier like 'bootstrap-sass'
// We also need to check for dirname since it might also be a deep import like 'bootstrap-sass/something'
let isModuleImport = request.charAt(0) !== "." && dirname === ".";
if (dirname.charAt(0) === "@") {
// Check whether it is a deep import from scoped npm package
// (i.e. @pkg/foo/file), if so, process import as file import;
// otherwise, if we import from root npm scoped package (i.e. @pkg/foo)
// process import as a module import.
isModuleImport = !(dirname.indexOf("/") > -1);
if (matchModuleImport.test(url)) {
return [request, url];
}
return (isModuleImport && [request]) || // Do not modify module imports
(hasCssExt && []) || // Do not import css files
(hasSassExt && [request]) || // Do not modify imports with explicit extensions
(startsWithUnderscore ? [] : extPrecedence) // Do not add underscore imports if there is already an underscore
.map(ext => "_" + basename + ext)
.concat(
extPrecedence.map(ext => basename + ext)
).map(
file => dirname + "/" + file // No path.sep required here, because imports inside SASS are usually with /
);
// libsass' import algorithm works like this:
// In case there is a file extension...
// - If the file is a CSS-file, do not include it all, but just link it via @import url().
// - The exact file name must match (no auto-resolving of '_'-modules).
if (ext === ".css") {
return [];
}
if (ext === ".scss" || ext === ".sass") {
return [request, url];
}
// In case there is no file extension...
// - Prefer modules starting with '_'.
// - File extension precedence: .scss, .sass, .css.
const basename = path.basename(request);
if (basename.charAt(0) === "_") {
return [
`${ request }.scss`, `${ request }.sass`, `${ request }.css`,
url
];
}
const dirname = path.dirname(request);
return [
`${ dirname }/_${ basename }.scss`, `${ dirname }/_${ basename }.sass`, `${ dirname }/_${ basename }.css`,
`${ request }.scss`, `${ request }.sass`, `${ request }.css`,
url
];
}
module.exports = importsToResolve;

View File

@@ -1,18 +1,14 @@
"use strict";
const sass = require("node-sass");
const path = require("path");
const async = require("neo-async");
const formatSassError = require("./formatSassError");
const webpackImporter = require("./webpackImporter");
const normalizeOptions = require("./normalizeOptions");
const pify = require("pify");
const semver = require("semver");
// This queue makes sure node-sass leaves one thread available for executing
// fs tasks when running the custom importer code.
// This can be removed as soon as node-sass implements a fix for this.
const threadPoolSize = process.env.UV_THREADPOOL_SIZE || 4;
const asyncSassJobQueue = async.queue(sass.render, threadPoolSize - 1);
let nodeSassJobQueue = null;
/**
* The sass-loader makes node-sass available to webpack modules.
@@ -47,8 +43,9 @@ function sassLoader(content) {
return;
}
// start the actual rendering
asyncSassJobQueue.push(options, (err, result) => {
const render = getRenderFuncFromSassImpl(options.implementation || require("node-sass"));
render(options, (err, result) => {
if (err) {
formatSassError(err, this.resourcePath);
err.file && this.dependency(err.file);
@@ -80,4 +77,48 @@ function sassLoader(content) {
});
}
/**
* Verifies that the implementation and version of Sass is supported by this loader.
*
* @param {Object} module
* @returns {Function}
*/
function getRenderFuncFromSassImpl(module) {
const info = module.info;
const components = info.split("\t");
if (components.length < 2) {
throw new Error("Unknown Sass implementation \"" + info + "\".");
}
const implementation = components[0];
const version = components[1];
if (!semver.valid(version)) {
throw new Error("Invalid Sass version \"" + version + "\".");
}
if (implementation === "dart-sass") {
if (!semver.satisfies(version, "^1.3.0")) {
throw new Error("Dart Sass version " + version + " is incompatible with ^1.3.0.");
}
return module.render.bind(module);
} else if (implementation === "node-sass") {
if (!semver.satisfies(version, "^4.0.0")) {
throw new Error("Node Sass version " + version + " is incompatible with ^4.0.0.");
}
// There is an issue with node-sass when async custom importers are used
// See https://github.com/sass/node-sass/issues/857#issuecomment-93594360
// We need to use a job queue to make sure that one thread is always available to the UV lib
if (nodeSassJobQueue === null) {
const threadPoolSize = Number(process.env.UV_THREADPOOL_SIZE || 4);
nodeSassJobQueue = async.queue(module.render.bind(module), threadPoolSize - 1);
}
return nodeSassJobQueue.push.bind(nodeSassJobQueue);
}
throw new Error("Unknown Sass implementation \"" + implementation + "\".");
}
module.exports = sassLoader;

View File

@@ -17,7 +17,6 @@
*/
const path = require("path");
const utils = require("loader-utils");
const tail = require("lodash.tail");
const importsToResolve = require("./importsToResolve");
@@ -63,7 +62,7 @@ function webpackImporter(resourcePath, resolve, addNormalizedDependency) {
return (url, prev, done) => {
startResolving(
dirContextFrom(prev),
importsToResolve(utils.urlToRequest(url))
importsToResolve(url)
) // Catch all resolving errors, return the original file and pass responsibility back to other custom importers
.catch(() => ({ file: url }))
.then(done);

View File

@@ -1,27 +1,28 @@
{
"_from": "sass-loader@^6.0.5",
"_id": "sass-loader@6.0.7",
"_from": "sass-loader@7.*",
"_id": "sass-loader@7.1.0",
"_inBundle": false,
"_integrity": "sha512-JoiyD00Yo1o61OJsoP2s2kb19L1/Y2p3QFcCdWdF6oomBGKVYuZyqHWemRBfQ2uGYsk+CH3eCguXNfpjzlcpaA==",
"_integrity": "sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==",
"_location": "/sass-loader",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "sass-loader@^6.0.5",
"raw": "sass-loader@7.*",
"name": "sass-loader",
"escapedName": "sass-loader",
"rawSpec": "^6.0.5",
"rawSpec": "7.*",
"saveSpec": null,
"fetchSpec": "^6.0.5"
"fetchSpec": "7.*"
},
"_requiredBy": [
"/laravel-mix"
"#DEV:/",
"#USER"
],
"_resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.7.tgz",
"_shasum": "dd2fdb3e7eeff4a53f35ba6ac408715488353d00",
"_spec": "sass-loader@^6.0.5",
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\laravel-mix",
"_resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.1.0.tgz",
"_shasum": "16fd5138cb8b424bf8a759528a1972d72aad069d",
"_spec": "sass-loader@7.*",
"_where": "C:\\xampp\\htdocs\\w4rpservices",
"author": {
"name": "J. Tangelder"
},
@@ -34,7 +35,8 @@
"loader-utils": "^1.0.1",
"lodash.tail": "^4.1.1",
"neo-async": "^2.5.0",
"pify": "^3.0.0"
"pify": "^3.0.0",
"semver": "^5.5.0"
},
"deprecated": false,
"description": "Sass loader for webpack",
@@ -46,17 +48,20 @@
"eslint-plugin-jsdoc": "^2.4.0",
"file-loader": "^0.11.2",
"mocha": "^3.0.2",
"mock-require": "^3.0.1",
"node-sass": "^4.5.0",
"nyc": "^11.0.2",
"raw-loader": "^0.5.1",
"sass": "^1.3.0",
"should": "^11.2.0",
"standard-version": "^4.2.0",
"style-loader": "^0.18.2",
"webpack": "^4.5.0",
"webpack-dev-server": "^2.4.1",
"webpack-merge": "^4.0.0"
},
"engines": {
"node": ">= 4.3 < 5.0.0 || >= 5.10"
"node": ">= 6.9.0 || >= 8.9.0"
},
"files": [
"lib"
@@ -72,8 +77,7 @@
"main": "lib/loader.js",
"name": "sass-loader",
"peerDependencies": {
"node-sass": "^4.0.0",
"webpack": "^2.0.0 || ^3.0.0 || ^4.0.0"
"webpack": "^3.0.0 || ^4.0.0"
},
"repository": {
"type": "git",
@@ -96,5 +100,5 @@
"travis:lint": "npm run lint",
"travis:test": "npm run test"
},
"version": "6.0.7"
"version": "7.1.0"
}