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,131 @@
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="0.23.1"></a>
## [0.23.1](https://github.com/webpack-contrib/style-loader/compare/v0.23.0...v0.23.1) (2018-10-08)
### Bug Fixes
* **addStyles:** support exports of transpiled transforms (`options.transform`) ([#333](https://github.com/webpack-contrib/style-loader/issues/333)) ([33aebed](https://github.com/webpack-contrib/style-loader/commit/33aebed))
<a name="0.23.0"></a>
# [0.23.0](https://github.com/webpack-contrib/style-loader/compare/v0.22.1...v0.23.0) (2018-08-27)
### Features
* **useable:** add `insertInto` support (`options.insertInto`) ([#341](https://github.com/webpack-contrib/style-loader/issues/341)) ([2588aca](https://github.com/webpack-contrib/style-loader/commit/2588aca))
<a name="0.22.1"></a>
## [0.22.1](https://github.com/webpack-contrib/style-loader/compare/v0.22.0...v0.22.1) (2018-08-08)
### Bug Fixes
* **addStyles:** use `var` instead of `const` (IE fix) ([#338](https://github.com/webpack-contrib/style-loader/issues/338)) ([1ca12ab](https://github.com/webpack-contrib/style-loader/commit/1ca12ab))
<a name="0.22.0"></a>
# [0.22.0](https://github.com/webpack-contrib/style-loader/compare/v0.21.0...v0.22.0) (2018-08-07)
### Bug Fixes
* insertInto and insertAt collaboration ([#325](https://github.com/webpack-contrib/style-loader/issues/325)) ([c7d8fec](https://github.com/webpack-contrib/style-loader/commit/c7d8fec))
### Features
* add support for __webpack_nonce__ ([#319](https://github.com/webpack-contrib/style-loader/issues/319)) ([fc24512](https://github.com/webpack-contrib/style-loader/commit/fc24512))
<a name="0.21.0"></a>
# [0.21.0](https://github.com/webpack-contrib/style-loader/compare/v0.20.3...v0.21.0) (2018-04-18)
### Features
* enable tag type configuration ([#316](https://github.com/webpack-contrib/style-loader/issues/316)) ([892cba5](https://github.com/webpack-contrib/style-loader/commit/892cba5))
<a name="0.20.3"></a>
## [0.20.3](https://github.com/webpack-contrib/style-loader/compare/v0.20.2...v0.20.3) (2018-03-09)
### Bug Fixes
* **package:** update `schema-utils` v0.4.3...0.4.5 (`dependencies`) ([#308](https://github.com/webpack-contrib/style-loader/issues/308)) ([9455888](https://github.com/webpack-contrib/style-loader/commit/9455888))
<a name="0.20.2"></a>
## [0.20.2](https://github.com/webpack-contrib/style-loader/compare/v0.20.1...v0.20.2) (2018-02-15)
### Bug Fixes
* **urls:** skip empty `url()` handling ([#304](https://github.com/webpack-contrib/style-loader/issues/304)) ([64f12dc](https://github.com/webpack-contrib/style-loader/commit/64f12dc))
<a name="0.20.1"></a>
## [0.20.1](https://github.com/webpack-contrib/style-loader/compare/v0.20.0...v0.20.1) (2018-01-26)
### Bug Fixes
* **index:** source code indentation ([#299](https://github.com/webpack-contrib/style-loader/issues/299)) ([b4642e7](https://github.com/webpack-contrib/style-loader/commit/b4642e7))
<a name="0.20.0"></a>
# [0.20.0](https://github.com/webpack-contrib/style-loader/compare/v0.19.1...v0.20.0) (2018-01-26)
### Bug Fixes
* **addStyles:** check if `HTMLIFrameElement` exist ([#296](https://github.com/webpack-contrib/style-loader/issues/296)) ([9b46128](https://github.com/webpack-contrib/style-loader/commit/9b46128))
* **index:** enable HMR in case `locals` (`css-modules`) are unchanged ([#298](https://github.com/webpack-contrib/style-loader/issues/298)) ([3a4cb53](https://github.com/webpack-contrib/style-loader/commit/3a4cb53))
* **options:** add `transform` option validation (`{String}`) ([23c3567](https://github.com/webpack-contrib/style-loader/commit/23c3567))
* **options:** support passing a `{Function}` (`options.insertInto`) ([e0c4b19](https://github.com/webpack-contrib/style-loader/commit/e0c4b19))
### Features
* support passing a `{Function}` (`options.insertInto`) ([#279](https://github.com/webpack-contrib/style-loader/issues/279)) ([0eb8fe7](https://github.com/webpack-contrib/style-loader/commit/0eb8fe7))
<a name="0.19.1"></a>
## [0.19.1](https://github.com/webpack/style-loader/compare/v0.19.0...v0.19.1) (2017-12-14)
### Bug Fixes
* **addStyles:** correctly check `singleton` behavior when `{Boolean}` (`options.singleton`) ([#285](https://github.com/webpack/style-loader/issues/285)) ([2bfc93e](https://github.com/webpack/style-loader/commit/2bfc93e))
<a name="0.19.0"></a>
# [0.19.0](https://github.com/webpack/style-loader/compare/v0.18.2...v0.19.0) (2017-10-03)
### Features
* add option to enable/disable HMR (`options.hmr`) ([#264](https://github.com/webpack/style-loader/issues/264)) ([378e906](https://github.com/webpack/style-loader/commit/378e906))
* add support for iframes (`options.insertInto`) ([#248](https://github.com/webpack/style-loader/issues/248)) ([25e8e89](https://github.com/webpack/style-loader/commit/25e8e89))
* support 'before' insertions (`options.insertAt`) ([#253](https://github.com/webpack/style-loader/issues/253)) ([67120f8](https://github.com/webpack/style-loader/commit/67120f8))
<a name="0.18.2"></a>
## [0.18.2](https://github.com/webpack/style-loader/compare/v0.18.1...v0.18.2) (2017-06-05)

87
node_modules/style-loader/README.md generated vendored
View File

@@ -14,11 +14,11 @@
<h2 align="center">Install</h2>
```
```bash
npm install style-loader --save-dev
```
<h2 align="center"><a href="https://webpack.js.org/concepts/loaders">Usage</a></h2>
<h2 align="center">Usage</h2>
It's recommended to combine `style-loader` with the [`css-loader`](https://github.com/webpack/css-loader)
@@ -57,7 +57,7 @@ style.className === "z849f98ca812"
### `Url`
It's also possible to add a URL `<link href="path/to/file.css" rel="stylesheet">` instead of a inlining the CSS `{String}` with `<style></style>` tag.
It's also possible to add a URL `<link href="path/to/file.css" rel="stylesheet">` instead of inlining the CSS `{String}` with `<style></style>` tag.
```js
import url from 'file.css'
@@ -84,10 +84,12 @@ import url from 'file.css'
<link rel="stylesheet" href="path/to/file.css">
```
> :information_source: Source maps and assets referenced with `url`: when style loader is used with `{ options: { sourceMap: true } }` option, the CSS modules will be generated as `Blob`s, so relative paths don't work (they would be relative to `chrome:blob` or `chrome:devtools`). In order for assets to maintain correct paths setting `output.publicPath` property of webpack configuration must be set, so that absolute paths are generated. Alternatively you can enable the `convertToAbsoluteUrls` option mentioned above.
> Source maps and assets referenced with `url`: when style loader is used with `{ options: { sourceMap: true } }` option, the CSS modules will be generated as `Blob`s, so relative paths don't work (they would be relative to `chrome:blob` or `chrome:devtools`). In order for assets to maintain correct paths setting `output.publicPath` property of webpack configuration must be set, so that absolute paths are generated. Alternatively you can enable the `convertToAbsoluteUrls` option mentioned above.
### `Useable`
The `style-loader` injects the styles lazily making them useable on-demand via `style.use()` / `style.unuse()`
By convention the `Reference Counter API` should be bound to `.useable.css` and the `.css` should be loaded with basic `style-loader` usage.(similar to other file types, i.e. `.useable.less` and `.less`).
**webpack.config.js**
@@ -128,19 +130,36 @@ style.unuse(); // = style.unref();
Styles are not added on `import/require()`, but instead on call to `use`/`ref`. Styles are removed from page if `unuse`/`unref` is called exactly as often as `use`/`ref`.
:warning: Behavior is undefined when `unuse`/`unref` is called more often than `use`/`ref`. Don't do that.
> ⚠️ Behavior is undefined when `unuse`/`unref` is called more often than `use`/`ref`. Don't do that.
<h2 align="center">Options</h2>
|Name|Type|Default|Description|
|:--:|:--:|:-----:|:----------|
|**`hmr`**|`{Boolean}`|`true`|Enable/disable Hot Module Replacement (HMR), if disabled no HMR Code will be added (good for non local development/production)|
|**`base`** |`{Number}`|`true`|Set module ID base (DLLPlugin)|
|**`attrs`**|`{Object}`|`{}`|Add custom attrs to `<style></style>`|
|**`transform`** |`{Function}`|`false`|Transform/Conditionally load CSS by passing a transform/condition function|
|**`insertAt`**|`{String}`|`bottom`|Inserts `<style></style>` at the given position|
|**`insertInto`**|`{String}`|`<head>`|Inserts `<style></style>` into the given position|
|**`insertAt`**|`{String\|Object}`|`bottom`|Inserts `<style></style>` at the given position|
|**`insertInto`**|`{String\|Function}`|`<head>`|Inserts `<style></style>` into the given position|
|**`singleton`**|`{Boolean}`|`undefined`|Reuses a single `<style></style>` element, instead of adding/removing individual elements for each required module.|
|**`sourceMap`**|`{Boolean}`|`false`|Enable/Disable Sourcemaps|
|**`convertToAbsoluteUrls`**|`{Boolean}`|`false`|Coverts relative URLs to absolute urls, when source maps are enabled|
|**`convertToAbsoluteUrls`**|`{Boolean}`|`false`|Converts relative URLs to absolute urls, when source maps are enabled|
### `hmr`
Enable/disable Hot Module Replacement (HMR), if disabled no HMR Code will be added.
This could be used for non local development and production.
**webpack.config.js**
```js
{
loader: 'style-loader',
options: {
hmr: false
}
}
```
### `base`
@@ -227,10 +246,12 @@ A `transform` is a function that can modify the css just before it is loaded int
This function will be called on the css that is about to be loaded and the return value of the function will be loaded into the page instead of the original css.
If the return value of the `transform` function is falsy, the css will not be loaded into the page at all.
> ⚠️ In case you are using ES Module syntax in `tranform.js` then, you **need to transpile** it or otherwise it will throw an `{Error}`.
**webpack.config.js**
```js
{
loader: 'style-loader'
loader: 'style-loader',
options: {
transform: 'path/to/transform.js'
}
@@ -252,7 +273,7 @@ module.exports = function (css) {
**webpack.config.js**
```js
{
loader: 'style-loader'
loader: 'style-loader',
options: {
transform: 'path/to/conditional.js'
}
@@ -278,36 +299,64 @@ By default, the style-loader appends `<style>` elements to the end of the style
**webpack.config.js**
```js
{
loader: 'style-loader'
loader: 'style-loader',
options: {
insertAt: 'top'
}
}
```
### `insertInto`
By default, the style-loader inserts the `<style>` elements into the `<head>` tag of the page. If you want the tags to be inserted somewhere else, e.g. into a [ShadowRoot](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot), you can specify a CSS selector for that element here, e.g
A new `<style>` element can be inserted before a specific element by passing an object, e.g.
**webpack.config.js**
```js
{
loader: 'style-loader'
loader: 'style-loader',
options: {
insertAt: '#host::shadow>#root'
insertAt: {
before: '#id'
}
}
}
```
### `insertInto`
By default, the style-loader inserts the `<style>` elements into the `<head>` tag of the page. If you want the tags to be inserted somewhere else you can specify a CSS selector for that element here. If you target an [IFrame](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement) make sure you have sufficient access rights, the styles will be injected into the content document head.
You can also pass function to override default behavior and insert styles in your container, e.g
**webpack.config.js**
```js
{
loader: 'style-loader',
options: {
insertInto: () => document.querySelector("#root"),
}
}
```
Using function you can insert the styles into a [ShadowRoot](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot), e.g
**webpack.config.js**
```js
{
loader: 'style-loader',
options: {
insertInto: () => document.querySelector("#root").shadowRoot,
}
}
```
### `singleton`
If defined, the style-loader will reuse a single `<style>` element, instead of adding/removing individual elements for each required module.
If defined, the style-loader will reuse a single `<style></style>` element, instead of adding/removing individual elements for each required module.
> This option is on by default in IE9, which has strict limitations on the number of style tags allowed on a page. You can enable or disable it with the singleton option.
**webpack.config.js**
```js
{
loader: 'style-loader'
loader: 'style-loader',
options: {
singleton: true
}
@@ -321,7 +370,7 @@ Enable/Disable source map loading
**webpack.config.js**
```js
{
loader: 'style-loader'
loader: 'style-loader',
options: {
sourceMap: true
}
@@ -335,7 +384,7 @@ If convertToAbsoluteUrls and sourceMaps are both enabled, relative urls will be
**webpack.config.js**
```js
{
loader: 'style-loader'
loader: 'style-loader',
options: {
sourceMap: true,
convertToAbsoluteUrls: true

98
node_modules/style-loader/index.js generated vendored
View File

@@ -2,7 +2,6 @@
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var path = require("path");
var loaderUtils = require("loader-utils");
@@ -17,32 +16,81 @@ module.exports.pitch = function (request) {
validateOptions(require('./options.json'), options, 'Style Loader')
return [
"// style-loader: Adds some css to the DOM by adding a <style> tag",
"",
"// load the styles",
"var content = require(" + loaderUtils.stringifyRequest(this, "!!" + request) + ");",
"if(typeof content === 'string') content = [[module.id, content, '']];",
"// Prepare cssTransformation",
"var transform;",
options.transform ? "transform = require(" + loaderUtils.stringifyRequest(this, "!" + path.resolve(options.transform)) + ");" : "",
"var options = " + JSON.stringify(options),
"options.transform = transform",
"// add the styles to the DOM",
"var update = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyles.js")) + ")(content, options);",
"if(content.locals) module.exports = content.locals;",
"// Hot Module Replacement",
options.hmr = typeof options.hmr === 'undefined' ? true : options.hmr;
// The variable is needed, because the function should be inlined.
// If is just stored it in options, JSON.stringify will quote
// the function and it would be just a string at runtime
var insertInto;
if (typeof options.insertInto === "function") {
insertInto = options.insertInto.toString();
}
// We need to check if it a string, or variable will be "undefined"
// and the loader crashes
if (typeof options.insertInto === "string") {
insertInto = '"' + options.insertInto + '"';
}
var hmr = [
// Hot Module Replacement,
"if(module.hot) {",
" // When the styles change, update the <style> tags",
" if(!content.locals) {",
" module.hot.accept(" + loaderUtils.stringifyRequest(this, "!!" + request) + ", function() {",
" var newContent = require(" + loaderUtils.stringifyRequest(this, "!!" + request) + ");",
" if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];",
" update(newContent);",
" });",
" }",
" // When the module is disposed, remove the <style> tags",
// When the styles change, update the <style> tags
" module.hot.accept(" + loaderUtils.stringifyRequest(this, "!!" + request) + ", function() {",
" var newContent = require(" + loaderUtils.stringifyRequest(this, "!!" + request) + ");",
"",
" if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];",
"",
" var locals = (function(a, b) {",
" var key, idx = 0;",
"",
" for(key in a) {",
" if(!b || a[key] !== b[key]) return false;",
" idx++;",
" }",
"",
" for(key in b) idx--;",
"",
" return idx === 0;",
" }(content.locals, newContent.locals));",
"",
// This error is caught and not shown and causes a full reload
" if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');",
"",
" update(newContent);",
" });",
"",
// When the module is disposed, remove the <style> tags
" module.hot.dispose(function() { update(); });",
"}"
].join("\n");
return [
// Style Loader
// Adds CSS to the DOM by adding a <style> tag
"",
// Load styles
"var content = require(" + loaderUtils.stringifyRequest(this, "!!" + request) + ");",
"",
"if(typeof content === 'string') content = [[module.id, content, '']];",
"",
// Transform styles",
"var transform;",
"var insertInto;",
"",
options.transform ? "transform = require(" + loaderUtils.stringifyRequest(this, "!" + path.resolve(options.transform)) + ");" : "",
"",
"var options = " + JSON.stringify(options),
"",
"options.transform = transform",
"options.insertInto = " + insertInto + ";",
"",
// Add styles to the DOM
"var update = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyles.js")) + ")(content, options);",
"",
"if(content.locals) module.exports = content.locals;",
"",
options.hmr ? hmr : ""
].join("\n");
};

View File

@@ -18,6 +18,8 @@ module.exports = function addStyleUrl (url, options) {
options.attrs = typeof options.attrs === "object" ? options.attrs : {};
options.hmr = typeof options.hmr === 'undefined' ? true : options.hmr;
var link = document.createElement("link");
link.rel = "stylesheet";
@@ -30,7 +32,7 @@ module.exports = function addStyleUrl (url, options) {
head.appendChild(link);
if (module.hot) {
if (options.hmr && module.hot) {
return function(url) {
if(typeof url === "string") {
link.href = url;
@@ -39,4 +41,4 @@ module.exports = function addStyleUrl (url, options) {
}
};
}
}
}

View File

@@ -23,19 +23,42 @@ var isOldIE = memoize(function () {
return window && document && document.all && !window.atob;
});
var getTarget = function (target, parent) {
if (parent){
return parent.querySelector(target);
}
return document.querySelector(target);
};
var getElement = (function (fn) {
var memo = {};
return function(selector) {
if (typeof memo[selector] === "undefined") {
memo[selector] = fn.call(this, selector);
return function(target, parent) {
// If passing function in options, then use it for resolve "head" element.
// Useful for Shadow Root style i.e
// {
// insertInto: function () { return document.querySelector("#foo").shadowRoot }
// }
if (typeof target === 'function') {
return target();
}
if (typeof memo[target] === "undefined") {
var styleTarget = getTarget.call(this, target, parent);
// Special case to return head of iframe instead of iframe itself
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
try {
// This will throw an exception if access to iframe is blocked
// due to cross-origin restrictions
styleTarget = styleTarget.contentDocument.head;
} catch(e) {
styleTarget = null;
}
}
memo[target] = styleTarget;
}
return memo[selector]
return memo[target]
};
})(function (target) {
return document.querySelector(target)
});
})();
var singleton = null;
var singletonCounter = 0;
@@ -54,10 +77,10 @@ module.exports = function(list, options) {
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
if (!options.singleton) options.singleton = isOldIE();
if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
// By default, add <style> tags to the <head> element
if (!options.insertInto) options.insertInto = "head";
if (!options.insertInto) options.insertInto = "head";
// By default, add <style> tags to the bottom of the target
if (!options.insertAt) options.insertAt = "bottom";
@@ -160,8 +183,11 @@ function insertStyleElement (options, style) {
stylesInsertedAtTop.push(style);
} else if (options.insertAt === "bottom") {
target.appendChild(style);
} else if (typeof options.insertAt === "object" && options.insertAt.before) {
var nextSibling = getElement(options.insertAt.before, target);
target.insertBefore(style, nextSibling);
} else {
throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
}
}
@@ -178,7 +204,16 @@ function removeStyleElement (style) {
function createStyleElement (options) {
var style = document.createElement("style");
options.attrs.type = "text/css";
if(options.attrs.type === undefined) {
options.attrs.type = "text/css";
}
if(options.attrs.nonce === undefined) {
var nonce = getNonce();
if (nonce) {
options.attrs.nonce = nonce;
}
}
addAttrs(style, options.attrs);
insertStyleElement(options, style);
@@ -189,7 +224,9 @@ function createStyleElement (options) {
function createLinkElement (options) {
var link = document.createElement("link");
options.attrs.type = "text/css";
if(options.attrs.type === undefined) {
options.attrs.type = "text/css";
}
options.attrs.rel = "stylesheet";
addAttrs(link, options.attrs);
@@ -204,12 +241,22 @@ function addAttrs (el, attrs) {
});
}
function getNonce() {
if (typeof __webpack_nonce__ === 'undefined') {
return null;
}
return __webpack_nonce__;
}
function addStyle (obj, options) {
var style, update, remove, result;
// If a transform function was defined, run it on the css
if (options.transform && obj.css) {
result = options.transform(obj.css);
result = typeof options.transform === 'function'
? options.transform(obj.css)
: options.transform.default(obj.css);
if (result) {
// If transform returns a value, use that instead of the original css.

View File

@@ -62,7 +62,7 @@ module.exports = function (css) {
.replace(/^'(.*)'$/, function(o, $1){ return $1; });
// already a full url? no change
if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
return fullMatch;
}

View File

@@ -2,6 +2,9 @@
{
"type": "object",
"properties": {
"hmr": {
"type": "boolean"
},
"base": {
"type": "number"
},
@@ -9,9 +12,15 @@
"type": "object"
},
"insertAt": {
"type": "string"
"type": ["string", "object"]
},
"insertInto": {
"anyOf": [
{ "type": "string" },
{ "instanceof": "Function" }
]
},
"transform": {
"type": "string"
},
"singleton": {
@@ -24,5 +33,5 @@
"type": "boolean"
}
},
"additionalProperties": true
"additionalProperties": false
}

View File

@@ -1,48 +1,55 @@
{
"_from": "style-loader@^0.18.2",
"_id": "style-loader@0.18.2",
"_from": "style-loader@^0.23.1",
"_id": "style-loader@0.23.1",
"_inBundle": false,
"_integrity": "sha512-WPpJPZGUxWYHWIUMNNOYqql7zh85zGmr84FdTVWq52WTIkqlW9xSxD3QYWi/T31cqn9UNSsietVEgGn2aaSCzw==",
"_integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==",
"_location": "/style-loader",
"_phantomChildren": {},
"_phantomChildren": {
"ajv": "6.10.0",
"ajv-errors": "1.0.1",
"ajv-keywords": "3.4.0"
},
"_requested": {
"type": "range",
"registry": true,
"raw": "style-loader@^0.18.2",
"raw": "style-loader@^0.23.1",
"name": "style-loader",
"escapedName": "style-loader",
"rawSpec": "^0.18.2",
"rawSpec": "^0.23.1",
"saveSpec": null,
"fetchSpec": "^0.18.2"
"fetchSpec": "^0.23.1"
},
"_requiredBy": [
"/laravel-mix"
],
"_resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.18.2.tgz",
"_shasum": "cc31459afbcd6d80b7220ee54b291a9fd66ff5eb",
"_spec": "style-loader@^0.18.2",
"_resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz",
"_shasum": "cb9154606f3e771ab6c4ab637026a1049174d925",
"_spec": "style-loader@^0.23.1",
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\laravel-mix",
"author": {
"name": "Tobias Koppers @sokra"
},
"bugs": {
"url": "https://github.com/webpack/style-loader/issues"
"url": "https://github.com/webpack-contrib/style-loader/issues"
},
"bundleDependencies": false,
"dependencies": {
"loader-utils": "^1.0.2",
"schema-utils": "^0.3.0"
"loader-utils": "^1.1.0",
"schema-utils": "^1.0.0"
},
"deprecated": false,
"description": "style loader module for webpack",
"devDependencies": {
"css-loader": "^0.28.3",
"file-loader": "^0.11.1",
"jsdom": "^9.12.0",
"memory-fs": "^0.4.1",
"mocha": "^3.4.2",
"css-loader": "^0.28.0",
"file-loader": "^1.0.0",
"istanbul": "^0.4.5",
"jsdom": "^9.0.0",
"memory-fs": "^0.4.0",
"mocha": "^4.0.0",
"nsp": "^3.2.1",
"sinon": "^4.0.0",
"standard-version": "^4.0.0",
"webpack": "^2.6.1"
"webpack": "^2.0.0"
},
"engines": {
"node": ">= 0.12.0"
@@ -54,18 +61,21 @@
"useable.js",
"options.json"
],
"homepage": "https://github.com/webpack/style-loader#readme",
"homepage": "https://github.com/webpack-contrib/style-loader#readme",
"license": "MIT",
"main": "index.js",
"name": "style-loader",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/webpack/style-loader.git"
"url": "git+https://github.com/webpack-contrib/style-loader.git"
},
"scripts": {
"release": "yarn run standard-version",
"ci:coverage": "npm run test:coverage",
"ci:test": "npm run test",
"release": "standard-version",
"security": "nsp check",
"test": "mocha",
"travis:test": "yarn run test"
"test:coverage": "istanbul cover node_modules/mocha/bin/_mocha"
},
"version": "0.18.2"
"version": "0.23.1"
}

27
node_modules/style-loader/url.js generated vendored
View File

@@ -16,17 +16,24 @@ module.exports.pitch = function (request) {
validateOptions(require('./options.json'), options, 'Style Loader (URL)');
return [
"// style-loader: Adds some reference to a css file to the DOM by adding a <link> tag",
"var update = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyleUrl.js")) + ")(",
"\trequire(" + loaderUtils.stringifyRequest(this, "!!" + request) + ")",
", " + JSON.stringify(options) + ");",
"// Hot Module Replacement",
options.hmr = typeof options.hmr === 'undefined' ? true : options.hmr;
var hmr = [
// Hot Module Replacement
"if(module.hot) {",
"\tmodule.hot.accept(" + loaderUtils.stringifyRequest(this, "!!" + request) + ", function() {",
"\t\tupdate(require(" + loaderUtils.stringifyRequest(this, "!!" + request) + "));",
"\t});",
"\tmodule.hot.dispose(function() { update(); });",
" module.hot.accept(" + loaderUtils.stringifyRequest(this, "!!" + request) + ", function() {",
" update(require(" + loaderUtils.stringifyRequest(this, "!!" + request) + "));",
" });",
"",
" module.hot.dispose(function() { update(); });",
"}"
].join("\n");
return [
// Adds some reference to a CSS file to the DOM by adding a <link> tag
"var update = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyleUrl.js")) + ")(",
" require(" + loaderUtils.stringifyRequest(this, "!!" + request) + ")",
", " + JSON.stringify(options) + ");",
options.hmr ? hmr : ""
].join("\n");
};

69
node_modules/style-loader/useable.js generated vendored
View File

@@ -16,41 +16,74 @@ module.exports.pitch = function (request) {
validateOptions(require('./options.json'), options, 'Style Loader (Useable)');
return [
"var refs = 0;",
"var dispose;",
"var content = require(" + loaderUtils.stringifyRequest(this, "!!" + request) + ");",
"if(typeof content === 'string') content = [[module.id, content, '']];",
"if(content.locals) exports.locals = content.locals;",
"exports.use = exports.ref = function() {",
" if(!(refs++)) {",
" dispose = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyles.js")) + ")(content, " + JSON.stringify(options) + ");",
" }",
" return exports;",
"};",
"exports.unuse = exports.unref = function() {",
" if(refs > 0 && !(--refs)) {",
" dispose();",
" dispose = null;",
" }",
"};",
options.hmr = typeof options.hmr === 'undefined' ? true : options.hmr;
// The variable is needed, because the function should be inlined.
// If is just stored it in options, JSON.stringify will quote
// the function and it would be just a string at runtime
var insertInto;
if (typeof options.insertInto === "function") {
insertInto = options.insertInto.toString();
}
// We need to check if it a string, or variable will be "undefined"
// and the loader crashes
if (typeof options.insertInto === "string") {
insertInto = '"' + options.insertInto + '"';
}
var hmr = [
// Hot Module Replacement
"if(module.hot) {",
" var lastRefs = module.hot.data && module.hot.data.refs || 0;",
"",
" if(lastRefs) {",
" exports.ref();",
" if(!content.locals) {",
" refs = lastRefs;",
" }",
" }",
"",
" if(!content.locals) {",
" module.hot.accept();",
" }",
"",
" module.hot.dispose(function(data) {",
" data.refs = content.locals ? 0 : refs;",
"",
" if(dispose) {",
" dispose();",
" }",
" });",
"}"
].join("\n");
return [
"var refs = 0;",
"var dispose;",
"var content = require(" + loaderUtils.stringifyRequest(this, "!!" + request) + ");",
"var options = " + JSON.stringify(options) + ";",
"options.insertInto = " + insertInto + ";",
"",
"if(typeof content === 'string') content = [[module.id, content, '']];",
// Export CSS Modules
"if(content.locals) exports.locals = content.locals;",
"",
"exports.use = exports.ref = function() {",
" if(!(refs++)) {",
" dispose = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyles.js")) + ")(content, options);",
" }",
"",
" return exports;",
"};",
"",
"exports.unuse = exports.unref = function() {",
" if(refs > 0 && !(--refs)) {",
" dispose();",
" dispose = null;",
" }",
"};",
options.hmr ? hmr : ""
].join("\n");
};